Você está na página 1de 136

CNC-ACADEMY®

CNC PROGRAMMING
SECRETS REVEALED

About the Author


”Ross’s success within CNC engineering related professions is positive proof that anyone
who decide and follow the instructions from this E book, can do so.”
Bryan Ferguson, AMB

“Author holds a degree in CNC Engineering and have been proudly working with
CNC programming, operating, setting and supervising CNC teams for decades. He
is bringing directly real world of International CNC machining experience into his
courses. This is not just another theoretic E-book, it is rather book written on
basis of many years of real CNC experience from machining of metal, plastics,
seal manufacturing… and managing CNC programming teams in automotive mass
production environments. It makes his courses so popular. If you work around
CNC machines, you will find this course very useful and will help you to get
comfortable very quickly with real problems in everyday programming and
practical applications. Ross’s courses are available on www.cnc-academy.com -
and you are able to order or download it from the comfort of your own home or
office!”
“CNC Machining News”
Thank you and congratulations!
Thank You for buying the “CNC Programming-Secrets revealed” CNC Course, and
congratulations, for taking a positive step towards your future as an CNC
Programmer, CNC Setter, CNC Operator...
The purpose of this E book is to show and teach how you can use newest CNC
technology tools to improve productivity, efficiency, and at the same time to
improve your life. We are in an “Information age” and when people want
information about new technology, they want it RIGHT NOW. So this is an easy
and affordable way to achieve your goals with lower costs and shorter time to
develop required skills. This is one of the most recession-proof jobs in the
industry today. Highly skilled computer numerical control personnel can expect to
earn an excellent salary.

PROGRAMMING COURSE OUTLINE:


Prerequisites……………………………………………………………………….....4
INTRODUCTION……………………………………………………………………….…….4
THE BASICS OF CNC..…………………………………………………………..........6
What is CNC……………………………………………………………………............6
History before CNC……………………………………………………………………………………...6
How CNC works…………………………………………………………………………………………...6
Motion control & axes…………………………………………………………………………………..7
The CNC program…………………………………………………………………………………….....7
The CNC control……………………………………………………………………………..............7
What is the CAM system………………………………………………………………………….…..7
What is DNC system…………………………………………………………………………...........8
Types of CNC machines……………………………………………………….......8
1. KNOW YOUR MACHINE…………………………………………………….........9
Having basic machining practise……………………………………………....................9
Learning about new CNC machine….…………………………………………………………...10
Machine components and configuration…….………………………………...............10
Some of important machine capacity facts you should know………………......11
Programmable functions and accessories on machine….……………………........11
Spindle control, S function……………………………………………………………………………………………………12
Automatic tool changer (ATC) on m/c or turret on turning centres, T function………….......12
Coolant control……………………………………………………………………………....................................12
Automatic pallet changer (APC) on machining centres……………………………………………………….12
Other accessories to the machine……………………………………………................12
Directions of motion (axes) and fundamental geometrical principles………..13
Home position (Reference point) for each axis……………………………..…………..13
2. FLOW OF THE CNC PROCESS……………………………………..13
3. CNC PROGRAMMING ……………………………………………....14
Coordinate systems,…………………………………………………………………………………….14
Plane designation,………………………..……………………………………………………………..16
Machine coordinate system,………………………………………………………………………..17
Part coordinate system…………………………………………………………………………….….19
Setting m/c coordinate system,……………………………………………….................20
Direction of motion (axes),………………………………………………………………………….21
Workpiece coordinate system,…………………………………………………………………….22
Definition of workpiece position,…………………………………………………………………23

2
Polar coordinates,……………………………………………………………………………………….24
Motion types,……………………………………………………………………………………………….25
G - codes (preparatory function),……………………………………………………………..25
M - codes (miscellaneous function),…………………………………………………………..28
Absolute command (G90),………………………………………………………………………...30
Incremental command (G91),…………………………………………………………………….31
Understanding of interpolation,…………………………………………………………………..32
Rapid motion (G00),…………………………………………………………......................33
Linear interpolation - Feeding (G01),………………………………………………………..33
Feed rate (F function),………………………………………………………………………………..33
Circular interpolation - circular motion (G02 and G03),……………………………33
Difference between R & I,J,K……………………………………………………………………..35
Other interpolation types, ………………………………………………………………………...37
Program zero, workpiece zero – positions of zero points,………………………..39
Z axis zero……………………………………………………………………..........................40
Metric/Imperial dimensions G70, G71, G700, G710,………………………………..40
4. TOOL OFFSETS…………………………………………………………40
What are offsets,…………………………………………………………………………………………40
Why we need offsets……………………………………………………………………………………40
Organizing offsets………………………………………………………………………………………..41
Types of compensation,……………………………………………………...………………………41
Tool length compensation) - G43 (machining centres),…………………………….42
Tool offset measuring sample……………………………………………………………………..44
How to consider tool length compensation………………………………………………….45
Cutter radius compensation G40-G42 (machining centres),………………… ….46
Reasons for cutter radius compensation,…………………………………………………….46
How to program cutter radius compensation, example,…………………………….47
Setting tool offsets………………………………………………………………………………………49
Dimensional tool (wear) offsets,…………………………………………………………………51
Tool nose radius compensation,………………………………………………………………….51
Other types of compensation……………………………………………………………………...52
5. LANGUAGE ELEMENTS OF PROGRAMMING LANGUAGE..53
Address, Data, Word, Block, Sequence, Program №,………………………………..53
Types of programs……………………………………………………………………………………….54
6. PROGRAM FORMATING……………………………………..…….55
Reasons to format CNC programs ………………………………………………………………55
Types of program format (program start-up, tool ending, tool start-up, and
program ending),……………………………………………………………………………………..55
Program configuration, structure and contents of an CNC program,………..56
7. LET’S START WRITING CNC PROGRAMS…………………….57
Prepare the work piece drawing,………………………………………………………………..57
Steps to prepare (mark up print, machining process, calculate coordinates,
select tooling, plan setup), ……………………………………………………………………57
Define machining sequences,………………………………………………….………………….57
Create a machining plan,…………………………………………………………………………….57
Translate the work steps into the machining language,…………………………….58
Combine all individual steps in a program,………………………………………………..58
Simple programming examples,………………………………………………………………….60
Program sample for circular arc………………………………………………………………….61
Program sample for machining a groove,…………………………………………………..63
CNC programs with three types of motion,………………………………………………..63
Typical mistakes………………………………..………………………………………………………..65
CNC program examples……………………………………………………………………………...66
8. SPECIAL PROGRAMMING FEATURES………………………..83
Canned cycles,…………………………………………………………………………………………….85
G73 –G89……………………………………………………………………………………………………..87

3
Grinding cycles…………………………………………………………………………………………..110
Constant surface speed control………………………………………………………………...115
Probe tips…………………………………………………………………………………………………...117
Geometric dimensioning an tolerancing…………………………………………………....118

After Word………………………………………………………………...122

Prerequisites
We assume students enrolling in these classes currently possess certain basic
machining practice skills, including the ability to read and interpret drawings, the
ability to interpret tolerances, the ability to use shop tools and measuring
devices, and the ability to perform arithmetic calculations.

Target group
This CNC programming course is aimed at tool machine users, CNC beginners,
skilled machine operators with the appropriate expertise in drilling, milling and
turning operations. It contains all the necessary information on how to
successfully make CNC programs for lathes and machining centres. Theoretic part
of the course is particularly helpful for NC beginners. Fanuc is the control of
choice in most shops in the World today we will learn their system and you will
have the best chance for a good job. That knowledge can be easily applied on
other CNC controls like Siemens, Heidenhain, Fadal…

However, we have our advanced macro programming course which is intended


for technicians with in-depth, comprehensive macro programming knowledge.

Introduction
There is quite a shortage of skilled people to utilize CNC machines, more
and more skilled machinists jobs, require CNC knowledge. And the shortage
worldwide is growing. Everywhere we can hear manufacturing people claiming
that they cannot find skilled people. So you can make a good wage and develop
a rewarding career working with CNC machines. So, learn the skills you need for
a better paying job.
Here are some of the job titles of people working with CNC machine tools and job
opportunities related to CNC:
With knowing CNC you will be able to work for manufacturing companies
as:

CNC helping hands


CNC tool setters
CNC operators
CNC setup people

4
CNC programmers
CAD-CAM system programmers
CNC maintenance personnel working for companies that sell CNC machines
CNC service technicians
CNC applications engineers
CNC school instructors
CNC instructors…

Everybody involved in the manufacturing environment should be well aware of


what is possible with these sophisticated machine tools. The design engineer, for
example, must possess enough knowledge of CNC to perfect dimensioning and
tolerancing techniques for workpieces to be machined on CNC machines. The tool
engineer must understand CNC in order to design fixtures and cutting tools for
use with CNC machines. Quality control people should understand the CNC
machine tools used within their company in order to plan quality control and
statistical process control accordingly. Production control personnel should be
abreast of their company's CNC technology in order to make realistic production
schedules. Managers, foremen, and team leaders should understand CNC well
enough to communicate intelligently with fellow workers. And, it goes without
saying that CNC programmers, setup people, operators, and others working
directly with the CNC equipment must have an extremely good understanding of
CNC.
In this presentation, we will explore the basics to advanced features CNC,
showing you much of what is involved with using these sophisticated machine
tools. Our primary goal will be to teach you how to learn about CNC. For readers
who will eventually be working directly with CNC machine tools, we will show you
the basics of each major CNC function. Additionally, we will make suggestions as
to how you can learn more about each CNC function as it applies to your
particular CNC machine/s. At the completion of this presentation, you should
have a good understanding of how and why CNC functions as it does and know
those things you must learn more about in order to work with any style of CNC
machine tool.
For readers who are not going to be working directly with CNC equipment in the
near future, our secondary goal will be to give you a good workmanship and
knowledge of CNC technology. At the completion of this presentation, you should
be quite comfortable with the fundamentals of CNC and be able to communicate
intelligently with others in your company about your CNC machine tools.
To proceed in an organized manner, we will be using only verified concept
approach to all presentations. If you can understand basic principles, you are
well on your way to becoming proficient with CNC. While our main focus will be
for the two most popular forms of CNC machine tools (machining centres and
turning centres), these key concepts can be applied to virtually any kind of CNC
machine, making it easy to adapt to any form of CNC equipment. With so many
types of CNC machine tools in existence, it is next to impossible for this
presentation to be extremely specific about any one particular type. The key
concepts allow us to view the main features of CNC in more general terms,
stressing why things are handled the way they are even more than the specific
techniques used with any one particular CNC machine tool.
With the broad background we give, you should be able to easily zero in on any
kind of CNC machine tool you will be working with. Practise reinforces a
student's understanding of learned information. As yet a third goal, this
presentation should help instructors of CNC. The approach we show has been
proven time and time again. This method of presentation will help students to
organize CNC course information logically and easy to understand all lessons.
This course curriculum assumes a comprehensive set of parallel practice
exercises.

5
The Basics of Computer Numerical Control

WHAT IS CNC?
CNC meaning: Computer Numerical Control and has been around since the early
1970's. Prior to this, it was called NC, for Numerical Control. (At the beginning
1970's computers were introduced to these controls, hence the name change.)
While people in most walks of life have never heard of this term, CNC is widely
used in almost every form of manufacturing process in one way or another. If
you'll be working in manufacturing, it's likely that you'll be dealing with CNC on a
regular everyday basis.
History before CNC?
While there are exceptions to this statement, CNC machines typically replace (or
work together with) some existing manufacturing process/as. Take one of the
simplest manufacturing processes, drilling holes, for example.
A drill press can of course be used to machine holes. (It's likely that almost
everyone has seen some form of drill, even if you don't work in manufacturing.) A
person can place a drill in the drill chuck that is secured in the spindle of the drill
press. They can then (manually) select the desired speed for rotation (commonly
by switching belt pulleys), and activate the spindle. Then they manually pull on
the quill lever to drive the drill into the workpiece being machined.
As you can easily see, there is a lot of manual intervention required to use a drill
press to drill holes. A person is required to do something almost every step along
the way! While this manual application may be acceptable for manufacturing
companies if but a small number of holes or workpieces must be machined, as
quantities grow, so does the likelihood for fatigue due to the repetitiveness of the
operation. And do note that we've used one of the simplest machining operations
(drilling) for our example. There are more complicated machining operations that
would require a much higher skill level (and increase the potential for mistakes
resulting in scrap workpieces) of the person running the conventional machine
tool. (We commonly refer to the style of machine that CNC is replacing as the
conventional machine.)
By comparison, the CNC equivalent for a drill press (possibly a CNC machining
centre or CNC drilling & tapping centre) can be programmed to perform this
operation in a much more automatic fashion. Everything that the drill press
operator was doing manually will now be done by the CNC machine, including:
placing the drill in the spindle, activating the spindle, positioning the workpiece
under the drill, machining the hole, and turning off the spindle.
How CNC works?
We have another Course available on Internet that explains how to program,
setup, and operate CNC machines in greater detail. Additionally, we offer a series
of products aimed at helping you learn how to properly use CNC machines. Here
we're relating how CNC works in very general terms.
As you already have some experience with different machinery you can guess
that everything that an operator would be required to do with conventional
machine tools is programmable with CNC machines. Once the machine is set
up and running, a CNC machine is quite simple to keep running, and it is
an easy job for somebody who previously worked hard on conventional
machines. In fact CNC operators tend to get quite bored during lengthy
production runs because there is so little to do. With some CNC machines,
even the workpiece loading process has been automated. CNC operators are
commonly required to do other things related to the CNC operation like
measuring workpieces and making adjustments to keep the CNC machine running
good quality workpieces.)
Let's look at some of the specific programmable functions.
Motion control and axes

6
All CNC machine types and CNC controls share this commonality: They all have
two or more programmable directions of motion called axes. An axis of motion
can be linear (along a straight line) or rotary (along a circular path). One of the
first specifications that imply a CNC machine's complexity is how many axes it
has. Generally speaking, the more axes, the more complex the machine.
The axes of any CNC machine are required for the purpose of causing the motions
needed for the manufacturing process. In the drilling example, these (3) axis
would position the tool over the hole to be machined (in two axes) and machine
the hole (with the third axis). Axes are named with letters. Common linear axis
names are X, Y, and Z. Common rotary axis names are A, B, and C.

The CNC program


Think of giving any series of step-by-step instructions. A CNC program is nothing
more than another kind of instruction set. It's written in sentence-like format and
the control will execute it in sequential order, step by step.
A special series of CNC commands are used to communicate what the machine is
intended to do. CNC words begin with letter addresses (like F for feedrate, S for
spindle speed, and X, Y & Z for axis motion). When placed together in a logical
method, a group of CNC words make up a command that resemble a sentence.
For any given CNC machine type, there will only be about 40-50 words used on a
regular basis. So if you compare learning to write CNC programs to learning a
foreign language having only 50 words, it shouldn't seem overly difficult to learn
CNC programming.
The CNC control
The CNC control will interpret a CNC program and activate the series of
commands in sequential order. As it reads the program, the CNC control will
activate the appropriate machine functions, cause axis motion, and in general,
follow the instructions given in the program.
Along with interpreting the CNC program, the CNC control has several other
purposes. All current model CNC controls allow programs to be modified (edited)
if mistakes are found. The CNC control allows special verification functions (like
dry run) to confirm the correctness of the CNC program. The CNC control allows
certain important operator inputs to be specified separate from the program, like
tool length values. In general, the CNC control allows all functions of the machine
to be manipulated.
CNC controls like Fanuc, Siemens, Heidenhain, Matsura, Mitsubishi, Mazak, Fadal,
Okuma… basically doing the same thing.
What is a CAM system?
For simple applications (like drilling holes), the CNC program can be developed
manually. That is, a programmer will sit down to write the program armed only
with pencil, paper, and calculator. Again, for simple applications, this may be the
very best way to develop CNC programs.
As applications get more complicated, and especially when new programs are
required on a regular basis, writing programs manually becomes much more
difficult. To simplify the programming process, a computer aided manufacturing
(CAM) system can be used. A CAM system is a software program that runs on a
computer (commonly a PC) that helps the CNC programmer with the
programming process. Generally speaking, a CAM system will take over most of
lengthy programming process.
In many companies the CAM system will work with the computer aided design
(CAD) drawing developed by the company's design engineering department. This
eliminates the need for redefining the workpiece configuration to the CAM
system. The CNC programmer will simply specify the machining operations to be
performed and the CAM system will create the CNC program (much like the
manual programmer would have written) automatically.
What is a DNC system?

7
Once the program is developed (either manually or with a CAM system), it must
be loaded into the CNC control. Though the setup person could type the program
right into the control, this would be like using the CNC machine as a very
expensive typewriter. If the CNC program is developed with the help of a CAM
system, then it is already in the form of a text file. If the program is written
manually, it can be typed into any computer using a common word processor
(though most companies use a special CNC text editor for this purpose). Either
way, the program is in the form of a text file that can be transferred right into the
CNC machine. A distributive numerical control (DNC) system is used for this
purpose.
A DNC system is nothing more than a computer that is networked with one or
more CNC machines. Until only recently, rather crude serial communications
protocol (RS-232c) had to be used for transferring programs. Newer controls
have more current communications capabilities and can be networked in more
conventional ways (Ethernet, etc.). Regardless of methods, the CNC program
must of course be loaded into the CNC machine before it can be run.
Types of CNC machines
As we said before, CNC has touched almost every segment of manufacturing.
Many machining processes have been improved and enhanced through the use of
CNC. Let's look at some of the specific fields and place the emphasis on the
manufacturing processes enhanced by CNC machine usage:
In the metal removal industry:
Machining processes that have traditionally been done on conventional machine
tools that are possible (and in some cases improved) with CNC machining centres
include all kinds of milling (face milling, contour milling, slot milling, etc.), drilling,
tapping, reaming, boring, grinding and counter boring.
In similar fashion, all kinds of turning operations like facing, boring, turning,
grooving, grinding, and threading are done on CNC turning centres.
There are all kinds of special "off-shoots" of these two machine types including
CNC milling machines, CNC drill and tap centres, and CNC lathes.
Grinding operations of all kinds like outside diameter (OD) grinding and internal
diameter (ID) grinding are also being done on CNC grinders. CNC has even
opened up a new technology when it comes to grinding. Contour grinding
(grinding a contour in a similar fashion to turning), which was previously
infeasible due to technology constraints is now possible (almost commonplace)
with CNC grinders.
In the metal fabrication industry:
In manufacturing terms, fabrication commonly refers to operations that are
performed on relatively thin plates. For example take cisterns... All of the primary
components are made of steel sheets. These sheets are sheared to size, holes are
punched in appropriate places, and the sheets are bent (formed) to their final
shapes. Again, operations commonly described as fabrication operations include
shearing, flame or plasma cutting, punching, laser cutting, forming, and welding.
Truly, CNC is heavily involved in almost every facet of fabrication.
CNC back gages are commonly used with shearing machines to control the length
of the plate being sheared. CNC lasers and CNC plasma cutters are also used to
bring plates to their final shapes. CNC turret punch presses can hold a variety of
punch-and-die combinations and punch holes in all shapes and sizes through
plates. CNC press brakes are used to bend the plates into their final shapes.
In the electrical discharge machining industry:
Electrical discharge machining (EDM) is the process of removing metal through
the use of electrical sparks which burn away the metal. CNC EDM comes in two
forms, vertical EDM and Wire EDM. Vertical EDM requires the use of an electrode
(commonly machined on a CNC machining centre) that is of the shape of the
cavity to be machined into the workpiece. Picture the shape of a plastic bottle
that must be machined into a mould. Wire EDM is commonly used to make punch
and die combinations for dies sets used in the fabrication industry. EDM is one of

8
the less known CNC operations because it is so closely related to making tooling
used with other manufacturing processes.
In the woodworking industry
As in the metal removal industry, CNC machines are heavily used in woodworking
shops. Operations include routing (similar to milling) and drilling. Many
woodworking machining centres are available that can hold several tools and
perform several operations on the workpiece being machined.
Other types of CNC machines
Many forms of lettering and engraving systems use CNC technology. Water jet
machining uses a high pressure water jet stream to cut through plates of
material. CNC is even used in the manufacturing of many electrical components.
For example, there are CNC coil winders, and CNC terminal location and soldering
machines.

Basic to advanced CNC programming course (machining centre and turning


centre)
The scope for this course is limited to G code level, manual programming. While
there are other programming methods (primarily computer aided manufacturing
[CAM] system programming), most experts in the field will agree that an
understanding of manual programming is of paramount importance to any CNC
programmer. And it is best to first learn about certain CNC features (like program
zero, motion types, compensation, among many others) at G code level. Trying to
learn the numerous CNC features while also attempting to learn a complex CAM
system can be difficult and confusing - in some cases impossible!

1. KNOW YOUR MACHINE


A CNC user MUST understand the makeup of the CNC machine tool being utilized.
While this may sound like a basic statement, a CNC user must be able to view the
machine from two distinctly different perspectives. Here are key concepts we will
be viewing the machine from a programmer's perspective. Much later, in this
course , we will look at the machine from an operator's viewpoint.

Having basic machining practice – is essential to success with any CNC


machine
Many forms of CNC machines are designed to enhance or replace what is
currently being done with more conventional machines. The first goal of any CNC
beginner should be to understand the basic machining practice that goes into
using the CNC machine tool. The more the beginning CNC user knows about basic
machining practice, the easier it will be to adapt to CNC.
Think of it this way. If you already know basic machining practice as it relates to
the CNC machine you will be working with, you already know what it is you want
the machine to do. It will be a relatively simple matter of learning how to tell the
CNC machine what it is you want it to do (learning to program). This is why
machinists make the best CNC programmers, operators, and setup personnel.
Machinists already know what it is the machine will be doing. It will be a relatively
simple matter of adapting what they already know to the CNC machine.
For example, a beginner to CNC turning centres should understand the basic
machining practice related to turning operations like rough and finish turning,
rough and finish boring, grooving, threading, and necking. Since this form of CNC
machine can perform multiple operations in a single program (as many CNC
machines can), the beginner should also know the basics of how to process
workpieces machined by turning so a sequence of machining operations can be
developed for workpieces to be machined.
This point cannot be overstressed. Trying to learn about a particular CNC machine
without understanding the basic machining practice related to the machine would

9
be like trying to learn how to fly an airplane without understanding the basics of
aerodynamics and flight. Just as a beginning pilot will be in for a great number of
problems without understanding aerodynamics, so is the beginning CNC user
have difficulty learning how to utilize CNC equipment without an understanding of
basic machining practice.

Learning about a new CNC machine


From a programmer's stand of point, as you begin to learn about any new CNC
machine, you should concentrate on four basic areas. First, you should
understand the machine's most basic components. Second, you should become
comfortable with your machine's directions of motion (axes). Third, you should
become familiar with any accessories equipped with the machine. And fourth, you
should find out what programmable functions are included with the machine and
learn how they are programmed. Manual handling on CNC machines, handling of
control unit,
handling of tools and accessories, tool measurement…

Fanuc Machining Centre Haas Turning Centre - Lathe

Machine components
While you do not have to be a machine designer to work with CNC equipment, it
is important to know how your CNC machine is constructed. Understanding your
machine's construction will help you to gauge the limits of what is possible with
your machine. Just as the race car driver should understand the basics of
suspension systems, breaking systems, and the workings of internal combustion
engines (among other things) in order to get the most out of a given car, so must
the CNC programmer understand the basic workings of the CNC machine in order
to get the most from the CNC machine tool.
For a universal style slant bed turning centre, for example, the programmer
should know the most basic machine components, including bed, way system,
headstock & spindle, turret construction, tailstock, and work holding device.
Information regarding the machine's construction including assembly drawings is
usually published right in the machine tool builder's manual. As you read the
machine tool builder's manual, here are some of the machine capacity and
construction questions to which you should find answers.

Some of important machine capacity facts you should know:

What is the machine's maximum RPM?


How many spindles ranges does the machine have (and what are the cut-off
points for each range?
What is the spindle and axis drive motor horsepower?
What is the maximum travel distance in each axis?
How many tools can the machine hold?

10
What way construction does the machine incorporates (usually square ways,
dovetail, and/or linear bearing ways)?
What is the machine's rapid rate (fastest traverse rate)?
What is the machine's fastest cutting feedrate?

These are but a few of the questions you should be asking yourself as you begin
working with any new CNC machine. Truly, the more you know about your
machine's capacity and construction, the easier it will be to get comfortable with
the machine.

Programmable functions and accessories


The programmer must also know what functions of the CNC machine are
programmable (as well as the commands related to programmable functions).
A CNC machine wouldn't be very helpful if all it could only move the workpiece in
two or more axes. Almost all CNC machines are programmable in several other
ways. The specific CNC machine type has a lot to do with its appropriate
programmable accessories. Again, any required function will be programmable on
full-blown CNC machine tools. Here are some examples for one machine type.
With low cost CNC equipment, often times many machine functions must be
manually activated. With some CNC milling machines, for example, about the
only programmable function is axis motion. Just about everything else may have
to be activated by the operator. With this type of machine, the spindle speed and
direction, coolant and tool changes may have to be activated manually by the
operator.
With full blown CNC equipment, on the other hand, almost everything is
programmable and the operator may only be required to load and remove
workpieces. Once the cycle is activated, the operator may be freed to do other
company functions.
Reference the machine tool builder's manual to find out what functions of your
machine are programmable. To give you some examples of how many
programmable functions are handled, here is a list a few of the most common
programmable functions along with their related programming words. As we
know, programmable functions will vary dramatically from one machine to the
next. The actual programming commands needed will also vary from builder to
builder. Be sure to check the M codes list (miscellaneous functions) given in the
machine tool builder's manual to find out more about what other functions may
be programmable on your particular machine. M codes are commonly used by the
machine tool builder to give the user programmable ON/OFF switches for machine
functions. In any case, you must know what you have available for activating
within your CNC programs.
For turning centres, for example, you may find that the tailstock and tailstock
quill is programmable. The chuck jaw open and close may be programmable. If
the machine has more than one spindle range, commonly the spindle range
selection is programmable. And if the machine has a bar feeder, it will be
programmable. You may even find that your machine's chip conveyor can be
turned on and off through programmed commands. All of this, of course, is
important information to the CNC programmer.

Spindle control, S function


The spindle speed can be easily specified and the spindle can be turned on in a
forward or reverse direction. It can also, of course, be turned off.

An "S" word is used to specify the spindle speed (in RPM for machining centres).
An M03 is used to turn the spindle on in a clockwise (CW, forward) manner. M04
turns the spindle on in a counter clockwise (CCW) manner. M05 turns the spindle
off. Note that turning centres also have a feature called constant surface speed
which allows spindle speed to also be specified in surface feet per minute (or

11
meters per minute). It calculates spindle speed so the surface speed is kept as
specified with a tool position change. It then supplies a voltage, corresponding to
the calculated spindle speed, to the spindle control to rotate the spindle at the
correct surface speed when the surface speed is specified after S.

Automatic tool changer ATC (machining centre) or turret (turning


centres)
T function
Most machining centres can hold many tools in a tool magazine. When required,
the required tool can be automatically placed in the spindle for machining.
The T code specifies tool №. When the T code is commanded, the magazine turn
and the specified tool are indexed at stand-by (auto) position.
Tool selection command or ―T " word is used to tell the machine which tool station
№ is to be placed in the spindle. Or in case of turning centres, to turn turret and
bring right tool in working position. On most machines, an M06 tells the machine
to actually make the tool change. Tool change (on turning centres) a four digit ―T
" word is used to command tool changes on most turning centres. The first two
digits of the T word specify the turret station number and the second two digits
specify the offset № to be used with the tool. T0101, for example specifies tool
station № one with offset № one.

Coolant control
Many machining operations require coolant for lubrication and cooling purposes.
Coolant can be turned on and off from within the machine cycle.
M08 is used to turn ON flood coolant. If available M07 is used to turn ON mist
coolant. M09 turns OFF the coolant.

Automatic pallet changer APC


An M60 command is commonly used to make pallet changes.
Other programmable features to look into
An M60 command is commonly used to make pallet changes.

Accessories to the machine


Other important area a beginner CNC user should address is related to other
possible additions to the basic machine tool itself. Many CNC machine tools are
equipped with accessories designed to enhance what the basic machine tool can
do. Some of these accessories may be made and supported by the machine tool
builder. These accessories should be well documented in the machine tool
builder's manual. Other accessories may be made by an after-market
manufacturer, in which case a separate manual may be involved.
Examples of CNC accessories include probing systems, tool length measuring
devices, post process gagging systems, automatic pallet changers, adaptive
control systems, bar feeders for turning centres, live tooling and C axis for
turning centres, and automation systems. Truly, the list of potential accessory
devices goes on and on.

Directions of motion (axes)


The CNC programmer MUST know the programmable motion directions (axes)
available for the CNC machine tool. The axes names will vary from one machine
tool type to the next. They are always referred to with a letter address. Common
axis names are X, Y, Z, U, V, and W for linear axes and A, C, and C for rotary
axes. However, the beginner programmer should confirm these axis designations
and directions (plus and minus) in the machine tool builder's manual since not all
machine tool builders conform to the axis names we show. As discussed in key
concept number one, whenever a programmer wishes to command movement in
one or more axes, the letter address corresponding to the moving axes as well as
the destination in each axis are specified: X3.5 for example tells the machine to

12
move the X axis to a position of 3.5 inches from the program zero point in X
(assuming the absolute mode of programming is used.

Home position (reference point) for each axis


Most CNC machines utilize a very accurate position along each axis as a starting
point or reference point for the axis. Some control manufacturers call this position
the zero return position. Others call it the grid zero position. Yet others call it the
home
position. Regardless of what it is called, the reference position is required by
many controls to give the control an accurate point of reference. CNC controls
that utilize a reference point for each axis require that the machine be manually
sent to its reference point in each axis as part of the power up procedure. Once
this is completed, the control will be in sync with the machine's position.

2. FLOW OF THE CNC PROCESS

PROGRAMING CNC MACHINE TOOL


OPERATION

Diagram above shows how it is look like complete process, when we have to
machine a part on CNC machine tool. In first place programmer has to read and
understand drawings, what is required to be machined. Secondly, programmer
has to prepare and make CNC program based on that drawing. That is why we
are here, to learn how to make good economically productive CNC program. We
assume students taking this course currently possess certain basic machining
practice skills, including the ability to read drawings. Older CNC machines used
paper tapes with punched programs on them. Then tape would be translated into
CNC program by a reader and stored into CNC system.
How a programmer will compose a program we will learn later in programming
chapter. But when program is finished and ready for transfer into CNC system,
today programmers using mostly direct transfer from PC to CNC system, or do
programming directly on CNC machine computer. Of course, today we are using
different CAD-CAM systems which make all programming process easy, more
creative and faster.
Next step is to mount work piece and required tools on machine. Tools have to be
set into tool magazine (machining centres) or turret (turning centres) as program
we made require. This part of job is called Setting CNC machines, which we are
going to learn in separate course with CD video help.
Last step is most exciting, actually then we can see how our idea from CNC
program
transforming into real part, and that is when we execute the machining.

13
3. CNC PROGRAMMING

This course describes the general CNC programming regardless of the type of the
machine, standard, or kind of CNC control. Explanation is made for necessary
items on programming, such as the programming words, methods…
Programming means the preparation of process sheet while looking at diagram
and drawings. CNC Programmer decides which combination of sequences,
symbols, numerals and other commands in program language he will use, and he
directly influences on productivity.

COORDINATE SYSTEMS
Programmer has to understand fundamental geometrical principles, same as
principles of NC programming. He is going to use those principles in his job all
the time.
When the position to be reached by the tool is given, the CNC moves the tool to
that position. The position to be reached by the tool is given as a coordinate value
in a coordinate system. The following three types of coordinate systems are
available:
We distinguish between the following coordinate systems:
# Machine coordinate system with machine zero point
# Work coordinate system with workpiece zero point
# Local coordinate system (This can also be current workpiece coordinate
system)

The position to be reached by the tool is commanded with a coordinate value of


one of the above coordinate systems, as required. The coordinate value consists
of one component for each program axis.

On sketch above we can see a


coordinate system. If there are three program axes (X, Y and Z), the coordinate
value is expressed as follows X…… Y…… Z……
Position of a tool when X40. Y30. Z25. is commanded.

14
Axis:
Standard axis Z,Y,Z
Swivel axis A,B,C
Auxiliary axis U,V,W

There are many basic coordinate systems familiar to students of geometry and
trigonometry. These systems can represent points in two-dimensional or three-
dimensional space. René Descartes (1596-1650) introduced systems of
coordinates based on orthogonal (right angle) coordinates. These two and three-
dimensional systems used in analytic geometry are often referred to as Cartesian
systems. Similar systems based on angles from baselines are often referred to as
polar systems.

15
Plane designation
A plane is defined by means of two coordinate axes. The third coordinate axis is
perpendicular to this plane and determines the infeed direction of the tool (e.g.
for 2D machining).
When programming, it is necessary to specify the working plane in order that the
control can calculate the Tool offset values correctly.
The plane is also relevant to certain types of circular programming and polar
coordinates.

16
Plain designation milling:

In the CNC program working planes are


specified as follows with G17, G18, G19
Plain designation turning:

Plane Identifier In-feed direction

X/Y G17 Z
Z/X G18 Y
Y/Z G19 X

Machine Zero Point


The machine zero point is a standard point on the machine, established by
manufacturer. The machine zero point is normally decided in accordance with the
type of CNC machine and it‘s done by machine tool builder.
A coordinate system having the zero point at the machine zero point is called
machine coordinate system.
The tool cannot always move to the machine zero point, because in some cases,
the machine zero point is set at a position to which the tool cannot move.
The machine coordinate system is established when the reference point return
(Home position) is first executed after the power is ON. Once the machine
coordinate system is established, it is not changed by Reset button, change of
work coordinate system, local coordinate system setting or other operations
unless the power is turned off.

17
The Machine Coordinate System

There are two types of coordinate systems in the world of


measurement. The first is called the Machine Coordinate
System. Here, the X, Y, and Z axes, refer to the
machine‘s motions. When viewed from the front of the
machine, the X axis runs from left to right, the Y axis runs
from front to back, and the Z axis runs up and down,
vertically perpendicular to the other two.

Most CNC machines use a three dimensional coordinate


system. In this system another axis, called Z, is added.
This creates additional planes (XZ and YZ) providing a third
dimension of measurement. Up and down movements can
be included using this system. All three axes (X, Y and Z) are at right angles to each other
and the point of intersection where the axes meet is called the origin (known as 0) or
datum point.

Each of the axes is assigned a value depending on how far you want the machine to move
in a particular direction. Setting the X, Y and Z values is the first step in writing a CNC
program. Depending on the direction of each movement and the value of each movement,
each movement is expressed as axes (X+, X-, Y+, Y-, Z+ or Z-).

18
”Three finger rule” (Doesn’t apply on lathes)

The axis directions follow so-called ,,three-finger rule‖ of the right hand. Standing
in front of machine, the middle finger of the right hand points away from the in
feed direction of the main spindle (doesn‘t apply on lathes). Following then
applies:

- Thumb points in the +X direction


- Index finger points in the +Y dir.
- Middle finger points in the +Z dir.
In practise, this can look quite different on different types of machines.

Machine coordinate system comprises of all the physically existing machine


axis. Referent points and tool and pallet changing points (fixed machine points)
are defined in the machine coordinate system. Where machine coordinate system
is used for programming (this is possible by using some of G codes (functions),
physical axes of the machine are addressed directly. Location of the coordinate
system relative to machine depends of machine type.

The Part Coordinate System

The second coordinate system is called the Part Coordinate System where the 3
axes relate to the datums or features of the workpiece.

Before the introduction of computer software to coordinate measurement, parts


were physically aligned parallel to the machine‘s axes so that the Machine and
Part Coordinate Systems were parallel to one another. This was very time
consuming and not very accurate. When the part was round or contoured, rather
than square or rectangular, the measurement task was nearly impossible.

19
What is Alignment?

With today's CMM software, the CMM measures the workpiece's datums (from the
part print), establishes the Part Coordinate System, and mathematically relates it
to the Machine Coordinate System.

The process of relating the two coordinate systems is called alignment (Figure
4). With a street map, we do this automatically by turning the map so that it is
parallel to street (datum) or to a compass direction (i.e., north). When we do
this, we're actually locating ourselves to the "world's coordinate system".

20
Datum is a location. It is a feature on a work-piece such as a hole, surface or
slot. We measure a work-piece to determine the distance from one feature to
another

The distance between the two holes on the work-piece can be measured once the
original origin is translated to the smaller hole and the part coordinate system is
mathematically rotated 45°. Now both of the holes lie along the new Y axis and
the distance can be calculated automatically.

Setting machine coordinate system


The machine coordinate system is inherent to each machine. It can be set
through manual return to the reference point (home position).
A coordinate system with its origin on the machine zero point is called m/c
coordinate system. After switching ON m/c the m/c coordinate system must be
set by reference point approach prior to indicating the command G53. G53 is a G
code effective once for the selection of the m/c coordinate system.
Commands are thus only valid in the block with G53 and are exclusively
traversed in rapid motion.
N…G53 X…Z…

21
-With command G53 cutting radius correction and tool correction are switched
off.
-G53 must be indicated in absolute dimension. With incremental dimension values
the command G53 are ignored.

Directions of motion (axes)


The CNC programmer MUST know the programmable motion directions (axes)
available for the CNC machine tool. The axes names will vary from one machine
tool type to the next. They are always referred to with a letter address. Common
axis names are X, Y, Z, U, V, and W for linear axes and A, C, and C for rotary
axes. However, in the beginning programmer should confirm these axis
designations and directions (plus and minus) in the machine tool builder's manual
since not all machine tool builders conform to the axis names we show. As
discussed before, whenever a programmer wishes to command movement in one
or more axes, the letter-address corresponding to the moving axes as well as the
destination in each axis are specified. X3.5, for example tells the machine to
move the X axis to a position of 3.5 inches from the program zero point in X
(assuming the absolute mode of programming is used.

22
Axis direction
Work-piece coordinate system
It was briefly described earlier. In order for the machine to control and operate
specified positions, these data must be made in a reference system that
corresponds to the direction of motion of the axis slides. A coordinate system with
axes X,Y and Z is used for this purpose. They are called Cartesian coordinate
systems.
The work piece zero position (W) is the origin of the work piece coordinate
system. Sometimes it is advisable or even necessary to work with negative
positional data. Positions to the left of the origine are prefixed by a negative sign
(-).Pic. below shows six different work-piece coordinate systems established,
each with separate coordinate values in CNC program.

23
Fixture Offsets (G54-G59.3) (See pic bellow)

Fixture offset are used to make a part home that is different from the absolute,
machine coordinate system. This
allows the part programmer to set up home positions for multiple parts. A typical
operation that uses fixture offsets
would be to mill multiple copies of parts on "islands" in a piece, similar to the
figure bellow:

To use fixture offsets, the values of the desired home positions must be stored in
the control, prior to running a program that uses them. Once there are values
assigned, a call to G54, for instance, would add 2 to all X values in a program. A
call to G58 would add 2 to X values and -2 to Y values in this example.

G53 is used to cancel out fixture offsets. So, calling G53 and then G0 X0 Y0
would send the machine back to the actual coordinates of X=0, Y=0.

G53 motion in machine coordinate system


G54 use preset work coordinate system 1
G55 use preset work coordinate system 2
G56 use preset work coordinate system 3
G57 use preset work coordinate system 4
G58 use preset work coordinate system 5
G59 use preset work coordinate system 6
G59.1 use preset work coordinate system 7
G59.2 use preset work coordinate system 8
G59.3 use preset work coordinate system 9

24
Definition of workpiece positions
To specify a position, imagine that a ruler is placed along the coordinate axes.
You can now describe every point in the coordinate system by specifying the
direction (X,Y and Z) and three numerical values. The workpiece zero always has
the coordinates X0, Y0, and Z0. (See drawings below)
Example:
For the sake of simplicity, we will only use one plane of the coordinate system in
this example, i.e. the X/Y plane. Points A to D than have the following point
coordinates:
A coordinates: X50. Y30.
B coordinates: X-20. Y70.
C coordinates: X-60. Y-60.
D coordinates: X20. Y-40.

Example with one plane on lathe (second picture):


Points A to D are defined by the following coordinates:
A coordinates: X40. Z-20.
B coordinates: X60. Z-40.
C coordinates: X60. Z-80.
D coordinates: X90. Z-90.

The main axes of a vertical machining center.

The X axis controls the table movement left or right.


• The Y axis controls the table movement toward or away from
the column.
• The Z axis controls the vertical (up or down) movement of
the knee or spindle.

25
In feed depth must also be described in milling operations. To program this, we
need to specify a numerical value for the third coordinate (Z in this case).
Example pic. bellow:
Points A1 to A2 are defined by the following coordinates:
A1 is defined by X20. Y20. Z-10.
A2 is defined by X50. Y70. Z-20.

26
Polar coordinates system commands
(G15, G16)
The coordinates used up to this point to specify points in the coordinate system
are called ,,Cartesian coordinates”.
However. There is another way to specify coordinates, namely as ,,polar
coordinates‖. The end point coordinate can be input in polar coordinates (radius
and angle). The plus direction of the angle is counterclockwise of the selected
plane first axis + direction, and the minus direction is clockwise. Both radius and
angle can be commanded in either absolute or incremental command(G90, G91).
Polar coordinates make sense when a workpiece or part of a workpiece has a
radius and angle. The point from which the dimensions are taken is called the
,,pole‖.
Example:
The points P1 and P2 can then be described-with reference to the pole - as
follows:
P1 corresponds to radius =100 + angle=30deg
P1 corresponds to radius = 60 + angle=75deg
When the radius is specified with absolute command ¸the zero point of local
coordinate system becomes the centre of the polar coordinate system.

Motion types
You Must Understand the Motion Types Available on Your CNC machine.
During discussion about ― Definition of work-piece positions‖
we discussed how end points for axis motion are commanded utilizing the
rectangular coordinate system. During that presentation, however, we were only
concerned with describing how the CNC machine determines the END POINT
position for each motion. To effectively command motion on most CNC machines
requires more than just specifying end points for positioning movements.
CNC control manufacturers try to make it as easy as possible to make movement
commands within the program. For those styles of motion that are commonly
needed, they give the CNC user interpolation types. We are going to learn about
it, but firstly we have to get used with G & M codes which are crucial in CNC
programming:

27
G – CODES (preparatory functions)
It shows the meaning of command for the concerned block. G following by the
number of 3 digits (usually 2 digits) address:
G codes are divided into following two types:
Type Meaning
One-shot G code The G code is effective only in the block in which
it is
Specified
Modal G code The G code is effective until another G code of the
same group is specified

Modal Codes

Many G codes and M codes cause the machine to change from one mode to
another, and the mode stays active until some other command changes it
implicitly or explicitly. Such commands are called "modal".

Modal codes are like a light switch. Flip it on and the lamp stays lit until someone
turns it off. For example, the coolant commands are modal. If coolant is turned
on, it stays on until it is explicitly turned off. The G codes for motion are also
modal. If a G1 (straight move) command is given on one line, it will be executed
again on the next line unless a command is given specifying a different motion
(or some other command which implicitly cancels G1 is given).

"Non-modal" codes effect only the lines on which they occur. For example, G4
(dwell) is non-modal.

Modal commands are arranged in sets called "modal groups". Only one member
of a modal group may be in force at any given time. In general, a modal group
contains commands for which it is logically impossible for two members to be in
effect at the same time. Measurement in inches vs. measure in millimetres are
modal. A machine tool may be in many modes at the same time, with one mode
from each group being in effect. The modal groups used in the interpreter are
shown in Table bellow:

G and M Code Modal Groups


Group 1 = {G0, G1, G2, G3, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89} -
motion
Group 2 = {G17, G18, G19} - plane selection
Group 3 = {G90, G91} - distance mode
Group 5 = {G93, G94} - spindle speed mode
Group 6 = {G20, G21} - units
Group 7 = {G40, G41, G42} - cutter diameter compensation
Group 8 = {G43, G49} - tool length offset
Group 10 = {G98, G99} - return mode in canned cycles
Group12 = {G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3} coordinate system
selection
Group 2 = {M26, M27} - axis clamping
Group 4 = {M0, M1, M2, M30, M60} - stopping
Group 6 = {M6} - tool change
Group 7 = {M3, M4, M5} - spindle turning
Group 8 = {M7, M8, M9} - coolant
Group 9 = {M48, M49} - feed and speed override bypass

28
NC Programming as per ISO (DIN 66025) and RS274

G codes simple definition


G00 Rapid traverse
G01 Linear interpolation with feed-rate
G02 Circular interpolation (clockwise)
G03 Circular interpolation (counter clockwise)
G2/G3 Helical interpolation
G04 Dwell time in milliseconds
G05 Spline definition
G06 Spline interpolation
G07 Tangential circular interpolation / Helix interpolation / Polygon interpolation /
Feed-rate interpolation
G08 Ramping function at block transition / Look ahead "off"
G09 No ramping function at block transition / Look ahead "on"
G10 Stop dynamic block pre-processing
G11 Stop interpolation during block pre-processing
G12 Circular interpolation (cw) with radius
G13 Circular interpolation (ccw) with radius
G14 Polar coordinate programming, absolute
G15 Polar coordinate programming, relative
G16 Definition of the pole point of the polar coordinate system
G17 Selection of the X, Y plane
G18 Selection of the Z, X plane
G19 Selection of the Y, Z plane
G20 Selection of a freely definable plane
G21 Parallel axes "on"
G22 Parallel axes "off"
G24 Safe zone programming; lower limit values
G25 Safe zone programming; upper limit values
G26 Safe zone programming "off"
G27 Safe zone programming "on"
G33 Thread cutting with constant pitch
G34 Thread cutting with dynamic pitch
G35 Oscillation configuration
G38 Mirror imaging "on"
G39 Mirror imaging "off"
G40 Path compensations "off"
G41 Path compensation left of the work piece contour
G42 Path compensation right of the work piece contour
G43 Path compensation left of the work piece contour with altered approach
G44 Path compensation right of the work piece contour with altered approach
G50 Scaling
G51 Part rotation; programming in degrees
G52 Part rotation; programming in radians
G53 Zero offset off
G54 Zero offset #1
G55 Zero offset #2
G56 Zero offset #3
G57 Zero offset #4
G58 Zero offset #5
G59 Zero offset #6
G63 Feed / spindle override not active
G66 Feed / spindle override active
G70 Inch format active

29
G71 Metric format active
G72 Interpolation with precision stop "off"
G73 Interpolation with precision stop "on"
G74 Move to home position
G75 Curvature function activation
G76 Curvature acceleration limit
G78 Normalcy function "on" (rotational axis orientation)
G79 Normalcy function "off"
G80 Canned cycle "off"
G81 Drilling to final depth canned cycle
G82 Spot facing with dwell time canned cycle
G83 Deep hole drilling canned cycle
G84 Tapping or Thread cutting with balanced chuck canned cycle
G85 Reaming canned cycle
G86 Boring canned cycle
G87 Reaming with measuring stop canned cycle
G88 Boring with spindle stop canned cycle
G89 Boring with intermediate stop canned cycle
G90 Absolute programming
G91 Incremental programming
G92 Position preset
G93 Constant tool circumference velocity "on" (grinding wheel)
G94 Feed in mm / min (or inch / min)
G95 Feed per revolution (mm / rev or inch / rev)
G96 Constant cutting speed "on"
G97 Constant cutting speed "off"
G98 Positioning axis signal to PLC
G99 Axis offset
G100 Polar transformation "off"
G101 Polar transformation "on"
G102 Cylinder barrel transformation "on"; Cartesian coordinate system
G103 Cylinder barrel transformation "on," with real-time-radius compensation (RRC)
G104 Cylinder barrel transformation with centre line migration (CLM) and RRC
G105 Polar transformation "on" with polar axis selections
G106 Cylinder barrel transformation "on" polar-/cylinder-coordinates
G107 Cylinder barrel transformation "on" polar-/cylinder-coordinates with RRC
G108 Cylinder barrel transformation polar-/cylinder-coordinates with CLM and RRC
G109 Axis transformation programming of the tool depth
G110 Power control axis selection/channel 1
G111 Power control pre-selection V1, F1, T1/channel 1 (Voltage, Frequency, Time)
G112 Power control pre-selection V2, F2, T2/channel 1
G113 Power control pre-selection V3, F3, T3/channel 1
G114 Power control pre-selection T4/channel 1
G115 Power control pre-selection T5/channel 1
G116 Power control pre-selection T6/pulsing output
G117 Power control pre-selection T7/pulsing output
G120 Axis transformation; orientation changing of the linear interpolation rotary axis
G121 Axis transformation; orientation change in a plane
G125 Electronic gear box; plain teeth
G126 Electronic gear box; helical gearing, axial
G127 Electronic gear box; helical gearing, tangential
G128 Electronic gear box; helical gearing, diagonal
G130 Axis transformation; programming of the type of the orientation change
G131 Axis transformation; programming of the type of the orientation change
G132 Axis transformation; programming of the type of the orientation change

30
G133 Zero lag thread cutting "on"
G134 Zero lag thread cutting "off"
G140 Axis transformation; orientation designation work piece fixed coordinates
G141 Axis transformation; orientation designation active coordinates
G160 ART activation
G161 ART learning function for velocity factors "on"
G162 ART learning function deactivation
G163 ART learning function for acceleration factors
G164 ART learning function for acceleration changing
G165 Command filter "on"
G166 Command filter "off"
G170 Digital measuring signals; block transfer with hard stop
G171 Digital measuring signals; block transfer without hard stop
G172 Digital measuring signals; block transfer with smooth stop
G175 SERCOS-identification number "write"
G176 SERCOS-identification number "read"
G180 Axis transformation "off"
G181 Axis transformation "on" with not rotated coordinate system
G182 Axis transformation "on" with rotated / displaced coordinate system
G183 Axis transformation; definition of the coordinate system
G184 Axis transformation; programming tool dimensions
G186 Look ahead; corner acceleration; circle tolerance
G188 Activation of the positioning axes
G190 Diameter programming deactivation
G191 Diameter programming "on" and display of the contact point
G192 Diameter programming; only display contact point diameter
G193 Diameter programming; only display contact point actual axes center point
G200 Corner smoothing "off"
G201 Corner smoothing "on" with defined radius
G202 Corner smoothing "on" with defined corner tolerance
G203 Corner smoothing with defined radius up to maximum tolerance
G210 Power control axis selection/Channel 2
G211 Power control pre-selection V1, F1, T1/Channel 2
G212 Power control pre-selection V2, F2, T2/Channel 2
G213 Power control pre-selection V3, F3, T3/Channel 2
G214 Power control pre-selection T4/Channel 2
G215 Power control pre-selection T5/Channel 2
G216 Power control pre-selection T6/pulsing output/Channel 2
G217 Power control pre-selection T7/pulsing output/Channel 2
G220 Angled wheel transformation "off"
G221 Angled wheel transformation "on"
G222 Angled wheel transformation "on" but angled wheel moves before others
G223 Angled wheel transformation "on" but angled wheel moves after others
G265 Distance regulation – axis selection
G270 Turning finishing cycle
G271 Stock removal in turning
G272 Stock removal in facing
G274 Peck finishing cycle
G275 Outer diameter / internal diameter turning cycle
G276 Multiple pass threading cycle
G310 Power control axes selection /channel 3
G311 Power control pre-selection V1, F1, T1/channel 3
G312 Power control pre-selection V2, F2, T2/channel 3
G313 Power control pre-selection V3, F3, T3/channel 3

31
G314 Power control pre-selection T4/channel 3
G315 Power control pre-selection T5/channel 3
G316 Power control pre-selection T6/pulsing output/Channel 3
G317 Power control pre-selection T7/pulsing output/Channel 3

Note that some of the above G-codes are not standard. Specific control features,
such as laser power control, enable those optional codes.

M – CODES (miscellaneous functions)


Programmer has to refer to the manual issued by the machine tool builder for
details of this functions used on particular machine. Generally when address M is
specified a code signal is transmitted. These signals are used to turn on/off
control on machine. Only one M command can be specified in one block. Selection
of M codes used on particular machine varies with machine tool builder.
These are most often used M codes:
M codes simple definition
M00 Unconditional stop
M01 Conditional stop
M02 End of program
M03 Spindle clockwise
M04 Spindle counter-clockwise
M05 Spindle stop
M06 Tool change (see Note below)
M07 Mist ON
M08 Coolant ON
M09 Coolant OFF
M10 Clamp ON
M11 Clamp OFF
M12 NC Rotary table clamp ON
M13 NC Rotary table clamp OFF
M19 Spindle orientation
M20 Start oscillation (configured by G35)
M21 End oscillation
M29 Rigid tapping
M30 End of program
M40 Automatic spindle gear range selection
M41 Spindle gear transmission step 1 (Spindle low speed range)
M42 Spindle gear transmission step 2 (Spindle high speed range -These codes are not
used on models without low/high)
M43 Spindle gear transmission step 3
M44 Spindle gear transmission step 4
M45 Spindle gear transmission step 5
M46 Spindle gear transmission step 6
M70 Spline definition, beginning and end curve 0 - Mirror image cancel
M71 Spline definition, beginning tangential, end curve 0 (X-axis mirror image)
M72 Spline definition, beginning curve 0, end tangential (Y-axis mirror image)
M73 Spline definition, beginning and end tangential (4-th axis mirror image)
M80 Delete rest of distance using probe function, from axis measuring input
M81 Drive On application block (resynchronize axis position via PLC signal during
the block), Arm forward
M82 Arm down
M83 Arm turn 180 deg.
M84 Arm up
M85 Arm retract
M98 Subprogram call

32
M99 End of subprogram, rewind function
M101-M108 Turn off fast output byte bit 1 (to 8)
M109 Turn off all (8) bits in the fast output byte
M111-M118 Turn on fast output byte bit 1 (to 8)
M121-M128 Pulsate (on/off) fast output byte bit 1 (to 8)
M140 Distance regulation “on” (configured by G265)
M141 Distance regulation “off”
M150 Delete rest of distance using probe function, for a probe input (one of 16,
M151-M168)
M151-M158 Digital input byte 1 bit 1 (to bit 8) is the active probe input
M159 PLC cannot define the bit mask for the probe inputs
M160 PLC can define the bit mask for the probe inputs (up to 16)
M161-M168 Digital input byte 2 bit 1 (to bit 8) is the active probe input
M170 Continue the block processing look ahead of the part program (cancel the
M171)
M171 Stop the block processing look ahead of the probe input part program
segment (like a G10)
M200 Activate the hand-wheel operation in the automatic mode (to introduce an
offset in the program)
M201-M208 Select the axis (by number from 1 to 8) for the hand-wheel operation
M209 Activate the hand-wheel operation in the automatic mode, with PLC control
of the axis selection
M210 Deactivate the hand-wheel input while in the automatic mode
M211 Deactivate this hand-wheel feature and also remove the hand-wheel offset (if
any)
M213 Spindle 2 clockwise
M214 Spindle 2 counter-clockwise (CCW)
M215 Spindle 2 stop
M280 Switchable spindle/rotary axis, rotary axis on, first combination
M281 Switchable spindle/rotary axis, rotary axis on, second combination
M290 Switchable spindle/rotary axis, spindle enabled, first combination
M291 Switchable spindle/rotary axis, spindle enabled, second combination

Note: Other machine functions, like tool change (usually M06) or coolant control,
have their M-code value specified by the PLC application not by the CNC software.

Other M-codes (up to M699) can be handled by the PLC application based on the
particular machine requirements.

Absolute command (absolute coordinate value) - G90


This is done by G90 command.
In program, there are two types of commands for axial(X,Y,Z) movement, and
one of them is absolute (absolute coordinate value) command. The other one is
Incremental. In the Absolute command, coordinate value of the end position is
programmed; In the Incremental command, move distance of the position itself is
programmed. G90 and G91 are used to command absolute or incremental
command respectively.

33
Command is made at the position (absolute coordinate value) from program zero
point. There is one zero point.
N1 G90 Z50. Y30.
N2 X200.Y30.
N3 X200.Y90.
N4 X50.Y90.
N5 X0 Y0
See pic. Below:

Explanation:
N1 G90 hereafter moving command is
absolute command. Moving to P1.
N2 Moving from P1 to P2.
N3 Moving from P2 to P3.
N4 Moving from P3 to P4.
N5 Movement from P4 to program zero
point.
Absolute dimensions refer to the origin of
the active coordinate system. Programmer
has to program the point to which the tool
is to travel , e.g. in the the workpiece
coordinate system.

34
Incremental command (incremental value) – G91
Is done by G91 command. (Pic Bellow) Locations are always given as the distance
and direction from the immediately preceding point. A ―X plus‖ (X+) command
will cause the cutting tool to be located to the right of the last point.
1. A ―X minus‖ (X-) command will cause the cutting tool to be located to the left
of the last point.
2. A ―Y plus‖ (Y+) command will cause the cutting tool to be located toward the
column.
3. A ―Y minus‖ (Y-) will cause the cutting tool to be located away from the
column.
4. A ―Z plus‖ (Z+) command will cause the cutting tool or spindle to move up or
away from the work-piece.
5. A ―Z minus‖ (Z-) moves the cutting tool down or into the work-piece.
In incremental programming, the G91 command indicates to the computer and
MCU (Machine Control Unit) that programming is in the incremental mode.

Explanation:
N1 G91 hereafter-moving command is
incremental (value) command.
Moving to P.
N2 with P1 as zero point moving to P2.
N3 with P2 as zero point moving to P3.
N4 with P3 as zero point moving to P4.
N5 with P4 as zero point moving to the start
point.

35
Understanding of interpolation
Say for example, you wish to move only one linear axis in a command.
Say you wish to move the X axis to a position one inch to the right of program
zero. In this case, the command X1. would be given (assuming the absolute
mode is instated). The machine would move along a perfectly straight line during
this movement (since only one axis is moving). Now let's say you wish to include
a Y axis movement to a position one inch above program zero in Y (with the X
movement). We'll say you are trying to machine a tapered or chamfered surface
of your work-piece in this command.
For the control to move along a perfectly straight line to get to the programmed
end point, it must perfectly synchronize the X and Y axis movements. Also, if
machining is to occur during the motion, a motion rate (feed-rate) must also be
specified. This requires linear interpolation.

Rapid motion G00 (also called positioning) or rapid traverse movement


This motion type (as the name implies) is used to command motion at the
machine's fastest possible rate. It is used to minimize non-productive time during
the machining cycle. Common uses for rapid motion include positioning the tool
to and from cutting positions, moving to clear clamps and other obstructions, and
in general, any non-cutting motion during the program.
You must check in the machine tool builder's manual to determine a machine's
rapid rate. Usually this rate is extremely fast (some machines boast rapid rates of
well over 1000 IPM!), meaning the operator must be cautious when verifying
programs during rapid motion commands. Fortunately, there is a way for the
operator to override the rapid rate during program verification.
The command almost all CNC machines use to command rapid motion is G00.
Within the G00 command, the end point for the motion is given. Control
manufacturers vary with regard to what actually happens if more than one axis is
included in the rapid motion command. With most controls, the machine will
move as fast as possible in all axes commanded. In this case, one axis will
probably reach its destination point before the other/s. With this kind of rapid
command, straight line movement will NOT occur during rapid and the
programmer must be very careful if there are obstructions to avoid. With other
controls, straight line motion will occur, even during rapid motion commands.

Straight line motion G01 (also called linear interpolation or feeding)

36
This motion type allows the programmer to command perfectly straight line
movements as discussed earlier during our discussion of linear interpolation. This
motion type also allows the programmer to specify the motion rate (feed-rate) to
be used during the movement. Straight line motion can be used any time a
straight cutting movement is required, including when drilling, turning a straight
diameter, face or taper, and when milling straight surfaces. The method by which
feed-rate is programmed varies from one machine type to the next. Generally
speaking, machining centres only allow the feed-rate to be specific in per minute
format (inches or millimetres per minute). Turning centres also allow feed-rate to
be specified in per revolution format (inches or millimetres per revolution).
A G01 word is commonly used to specify straight line motion. Within the G01, the
programmer will include the desired end point in each axis.

Circular interpolation motion (also called circular interpolation)


G02 / G03
This motion type causes the machine to make movements in the form of a
circular path. As discussed earlier during our presentation of circular
interpolation, this motion type is used to generate radius during machining. All
feed-rate related points made during our discussion of straight line motion still
apply.
Two G codes are used with circular motion. G02 is commonly used to specify
clockwise CW motion, while G03 is used to specify counter clockwise CCW
motion. To evaluate which to use, you simply view the movement from the same
perspective the machine will view the motion. For example, if making a circular
motion in XY on a machining centre, simply view the motion from the spindle's
vantage point. If making a circular motion in XZ on a turning centre, simply view
the motion from above the spindle. In most cases, this is as simple as viewing the
print from above.
Additionally, circular motion requires that, by one means or another, the
programmer specifies the radius of the arc to be generated. With newer CNC
controls this is handled by a simple "R" word. The R word within the circular
command simply tells the control the radius of the arc being commanded. With
older controls, directional vectors (specified by I, J, and K) tell the control the
location of the arc's centre point. Since controls vary with regard to how
directional vectors are programmed, and since the R word is becoming more and
more popular for radius designation, our examples will show the use of the R
word. If you wish to learn more about directional vectors, you must reference
your control manufacturer's manual. G17 (XY plane) is selected when the power
is turned ON. The clockwise and counter clockwise directions are shown below:

Clockwise G02 and counter-clockwise G03 on the Xp Yp plane are defined when
the Xp Yp plane is viewed in the positive–to-negative direction of the Zp axis (Yp
or Xp axis respectively) in the Cartesian coordinate system, see pic above. The
arc centre is specified by addresses I, J, and K for the Xp, Yp and Zp axes. The
numerical value following I,J,K however is a vector component in which the arc
centre is seen from the start point, and is always specified in an Incremental
value irrespective of G90 and G91 as shown below. I, J, and K must be signed
according to the direction.

37
Arc on X-Y plane:
G17 (G02, G03) Xp…Yp…(R…)I…J…F…
Arc on Z-X plane:
G18 (G02, G03) Xp…Zp…(R…)I…K…F…
Arc on Y-Z plane:
G19 (G02, G03) Yp…Zp…(R…)J…K…F…

Date to be given Command Meaning


1. Plane selection G17 Specification of arc on XpYp plane
G18 ― arc on ZpXp
plane
G19 ― arc on YpZp
plane
2. Direction of rotation G02 Clockwise direction CW
G03 Counter clockwise direction CCW
3. End point pos. G90 mode Two of the End point position in the work coordin-
ate system
_____________________________________________
G91 mode Two of the Distance from start point to end point
Xp, Yp, and
Zp axes
4. Distance from start Two of the I, Signed distance from start point to
point to centre J, and K axes centre

_________________________________________________________________
__
Arc radius R Arc radius
5. Feed rate F Feed rate along arc.

Tool path from drawing above can be programmed as follows:

1) In absolute programming:
G92 X200. Y40. Z0
G90 G03 X140. Y100. I-60. F300
G02 X120. Y60. I-50.
Or

38
G92 X200. Y40. Z0
G90 G03 X140. Y100. R60. F300

2. In incremental programming:
G91 G03 X-60. Y60. I-60. F300
G02 X-20. Y-40. I-50.
Or
G91 G03 X-60. Y60. R60. F300
G02 X-20. Y-40. R50.

What is difference ???

R is easier to define , easier to make a mistake and get an incorrect radius.


With R the machine still do the work whether the R is correct or incorrect.
With incorrect I, J, K, the machine will stop and give an alarm message before
executing.
With R to generate a circle path of over 180 deg, then specify a negative R.

G02 G03

With 1 dia tool:

Using R:
G1 X1. Y-5.
G3 X0 Y5. R1.

Using I & J:
G1 X1. Y-5.
G3 X0 Y5. I-1. J0
Sample program (R & J):

39
G01 Y1.25 F12
X1.5 (to start point)
G02 X2.25 Y0.5 J-0.75 or R0.75

Example G02 (Not related to pic above)


%
:1003 (PROGRAM #1003)
N5 G90 G20 G17 (ABSOLUTE, AND INCH PROGRAMMING, XY Plane)
N10 M06 T2 (TOOL CHANGE TO TOOL #2)
N15 M03 S1200 (SPINDLE CW AT 1200RPM)
N20 G00 X1 Y1 (RAPID TO OVER X1,Y1)
N25 Z0.1 (RAPID DOWN TO Z0.1)
N30 G01 Z-0.1 F5 (FEED DOWN TO Z-0.1 AT 5IPM)
N35 G02 X2 Y2 I1 J0 F20 (ARC FEED CW AT RADIUS I1,J0 AT 20IPM)
N37 G00 X2 Y2 Z-0.1
N40 G01 X3.5 (FEED OVER TO X3.5)
N45 G02 X3 Y0.5 R2 (ARC FEED CW WITH RADIUS OF 2)
N50 X1 Y1 R2 ARC FEED CW WITH RADIUS OF 2)
N55 G00 Z0.1 (RAPID UP TO Z0.1)

40
N60 X2 Y1.5 (RAPID OVER TO X2 AND Y1.5)
N65 G01 Z-0.25 (FEED DOWN TO Z-0.25)
N70 G02 X2 Y1.5 I0.25 J-0.25 (FULL CIRCLE ARC FEED MOVE)
N75 G00 Z1 (RAPID UP TO Z1)
N80 X0 Y0 (RAPID OVER TO X0 AND Y0)
N85 M05 (SPINDLE OFF)
N90 M30 (PROGRAM END)

Other interpolation types


Depending on the machine's application, you may find that you have other
interpolation types available. Again, CNC control manufacturers try to make it as
easy as possible to program their controls. If an application requires a special
kind of movement, the control manufacturer can give the applicable interpolation
type. For example, many machining center users perform thread milling
operations on their machines. During thread milling, the machine must move in a
circular manner along two axes (usually X and Y) at the same time a third axis
(usually Z) moves in a linear manner. This allows the helix of the thread to be
properly machined. This motion resembles a spiralling motion (though the radius
of the spiral remains constant).
Knowing that their customers need this type of motion for thread milling, CNC
machining centre control manufacturers offer the feature helical interpolation.
With this feature, the user can easily command the motions necessary for thread
milling.

By Helical interpolation tool is moved along a helix, by specifying circular


interpolation together with movement along an axis in a plane other then that
specified for circular interpolation:
G17 {G02/G03}Xp…Yp…{I…J…/R…}α…F…
G18 {G02/G03}Xp…Zp…{I…K…/R...}α…F…
G19 {G02/G03}Yp…Zp…{J…K…/R…}α…F…
While your particular CNC machine may have more motion types (depending on
your application), let's concentrate on becoming familiar with the three most
common types of motion. These three motion types are available on almost all
forms of CNC equipment. After briefly introducing each type of motion, we'll show
an example program that stresses the use of all three.
These motion types share two things in common. First, they are all modal. This
means they remain in effect until changed. If for example, several motions of the
same kind are to be given consecutively, the corresponding G code need only be
specified in the first command. Second, the END POINT of the motion is specified
in each motion command. The current position of the machine will be taken as
the starting point.

Next picture shows Cylindrical interpolation:

41
Example of a Cylindrical interpolation program:

G00 G90 Z100. C0


G01 G91 G18 Z0 C0
G107 C57299
G90 G01 G42 Z120. D01 F250
C30.0
G02 Z90.0 C60.0 R30.0
G01 Z70.0
G03 Z60.0 C70.0R10.0
G01 C150.0
G03 Z70.0 C190.0 R75.0
G01 Z110.0 C230.0 R75.0
G01 C360.0
G40 Z100.0
G107 C0
M30

Program zero - Workpiece zero – Position of zero points

On this basic drawing below we can see position of program zero point and
coordinate system. In case of program be sure to decide the program-zero point
is decided by programmer by looking at the machining diagram.

Assigning Program zero


Keep in mind that the CNC control must be told the location of the program zero
point by one means or another. How this is done varies dramatically from one
CNC machine and control to another. One (older) method is to assign program
zero in the program. With this method, the programmer tells the control how far
it is from the program zero point to the starting position of the machine. This is
commonly done with a G92 (or G50) command at least at the beginning of the
program and possibly at the beginning of
each tool.

42
Another, newer and better way to assign program zero is through some form of
offset. Commonly machining center control manufacturers call offsets used to
assign program zero fixture offsets. Turning center manufacturers commonly call
offsets used to assign program zero for each tool geometry offsets.

Reference Points (Zero points) on CNC Machine


The various origins and reference positions are defined on a CNC machine.
Machining Centre:

Turning Centre:

Diagrams show zero points and reference points for turning and drilling/milling
machines.
Z - axis zero point
Program is generally made by deciding the standard face at the machining
diagram as zero, namely
1. machining surface with face milling,

43
2. surface regarded as standard by the description of dimension even without
machining.
With 1. and 2. decided as Z 0 (zero point), program is performed.
Z value on the program is always tool nose position.
Tool length compensation will be mentioned later.

Instruction of Z0 (zero) to machine side is made with one touch by the use of W-
setter (Sensor).

Metric/Inch input
Metric/ inch input can be selected by G code in CNC program:
G20 inch input
G21 metric input
G code should be specified in an independent block before setting the coordinate
system at the beginning of the program.
Switching off m/c doesn‘t change status was before.
G20 & G21 must not be switched during a program.
The inch/metric input can also be switched using settings.

4. TOOL OFFSETS
What are offsets?
All forms of compensation work with offsets. CNC offsets are like memories on an
electronic calculator. If your calculator has memories, you know you can store a
constant value into each memory for use during a calculation. This keeps you
from having to enter the number over and over again with redundant
calculations. Latter in program if programmed for example T1 D1, that means
program will use value of offset No.1 in offset file.
Like the memories of an electronic calculator, offsets in the CNC control are
storage locations into which numerical values can be placed. Just as the value
within the memory of a calculator has no meaning until referenced by its user
within a calculation, neither does the value within an offset of the CNC control
have any meaning until it is referenced by a CNC program.
Why we need tool offsets
Tool offsets can be used for several purposes depending on the style of machine
tool and type of compensation being used. Here are some of the more common
applications for offsets.
*To specify tool each tool's length

44
For machining centre applications, it would be very difficult for the programmer to
predict the precise length of each tool used in the program. For this reason, the
feature tool length compensation allows the programmer to ignore each tool's
length as the program is written. At the time of setup, the setup person measures
the length of each tool and inputs the tool length value into the corresponding
offset.
*To specify the radius of the cutting tool
When milling on the periphery of the cutter (contour milling), it can be
cumbersome and difficult for the programmer to program the cutter's path based
on the size of the milling cutter being used. Also, if the cutter size must change
(possibly due to re-sharpening), it would be infeasible to change the program
based on the new cutter size. For this reason, the feature cutter radius
compensation allows the programmer to ignore the cutter size as the program is
written. The setup person inputs the size of each milling cutter into its
corresponding tool offset. In similar fashion, turning centres have a feature called
tool nose radius compensation. With this feature, an offset is used to specify the
radius of the very tip of the turning or boring tool.
*Assigning program zero
Machining centres that have fixture offsets (also called coordinate system
shifting) allow the user to specify the position of the program zero point within
offsets, keeping the assignment of program zero separate from the program. In
similar fashion many turning centres allow the assignment of program zero with
offsets (this feature is commonly called geometry offsets).
*To allow sizing on turning centres
Tool offsets are used on all turning centres to allow the operator to hold size with
tools used within their programs. This allows the operator to adjust for
imperfections with tool placement during setup. It also allows the operator to
adjust the tool's movements to allow for tool wear during each tool's life.
Organizing offsets
With some CNC controls, the organization of offsets is very obvious. Some
machining centre controls, for example, automatically make the offset №
correspond to the tool station №. With this kind of machine, when tool station
number one is commanded, the control will automatically invoke offset number
one. Within offset number one, the operator can store a tool length value as well
as a tool radius value.
Unfortunately, not all controls make it this simple. In many controls, each offset
contains only one value and the offset number has no real relationship to the tool
station number. In this case, the programmer must cautiously organize which
offset/s are used with each tool.
For example, the tool length compensation offset numbers can be made the same
as tool station numbers. Cutter radius compensation offset numbers can be made
equal to the tool station number PLUS a constant value larger than the number of
tools the machine can hold. If the machine can hold 25 tools, tool station number
one could be made to use offset number one to store its length compensation
value and offset number thirty-one could be used to store its cutter radius
compensation value. With this method of offset organization, the programmer
and operator are constantly in sync.
The offset table on most turning centres incorporate at least two values per
offset. Generally speaking, the programmer will instate the offset number
corresponding to the tool station number for each tool offset used. That is, tool №
one will use (only) offset № one, tool two will use offset two, and so on.
Additionally, most turning centre offset tables allow the user to enter data related
to the tool's radius (for tool nose radius compensation). Typically the radius (R
column of the offset table) and the tool type (the T column of the offset table)
can be specified within the turning centre‘s offset table.
Types of compensation

45
Now let's discuss the compensation types for the two most popular forms of CNC
machine tools, machining centres and turning centres. Keep in mind that while
the actual use of these functions varies dramatically from one machine to the
next, the basic reasoning behind each compensation type remains remarkably
similar. With an understanding of why the compensation type is required, and
with an elementary understanding of how it is applied to one specific control, you
should be able to adapt to any variations that you come across.
Tool length compensation - G43 (machining centres), Wear offsets
(turning centres)
In this chapter we are going to learn and understand the forms of compensation.
All types of CNC machine tools require some form/s of compensation. Though
applied for different reasons on different machine types, all forms of
compensation allow the CNC user to allow for unpredictable conditions related to
tooling as the program is developed. Before discussing how compensation applies
to CNC usage, let's look at compensation in general terms.
Different types of compensation are used in many facets of everyday life. The
airplane pilot must compensate for wind velocity and direction as a heading is set.
The race car driver must compensate for weather and track conditions as a turn is
negotiated. A bowler must compensate for the spin of the bowling ball as the ball
rolls down the alley.

46
CUTTER COMPENSATION

What is cutter compensation?

It‘s the ability of the machine to compensate for tool size whilst milling profiles to do this
we have to tell the machine what 1/2 the size of the cutter is and this is achieved by
setting an offset number we wish to use with this tool - we call this offset in the program
by specifying a ‗D‘ value.
The ‘D’ number we use is our choice and as programmers we normally select a number
that can easily be associated with the tool number we are using so if you have 30 tools on
your machine then it would make sense to start your ‘D’ numbers at say ‗D31‘ for tool-1,
‗D32‘ for tool-2, etc. as the possibility exists that you may have all 30 tools in the
magazine thus requiring 30 tool length offsets.
To utilise the compensation, we are asking the machine to calculate the intersections of
the cutter path, whereas normally we would have to calculate these intersections ourselves
To make the system work then we have to follow some rules.
The rules that follow are made up from the requirements of the control and a lot of
experience and are not set in stone however IF YOU FOLLOW THE RULES YOU WON‘T GO
FAR WRONG?

ALWAYS APPLY THE COMPENSATION IN A MOVE COMMAND


G00 or G01 is good try not to use G02 or G03.

ALWAYS APPLY THE COMP AT 90 DEGREES TO THE NEXT PROGRAM MOVE


I.E. 1 Axis at a time this makes fault finding whilst proving out easier, it may cost
you an extra line or two in the program, but in the long term it will actually save
you time.
You can apply comp in two axes if required, but can you determine the path the
tool will take?

THE MACHINE REQUIRES CONTINUOUS CUTTING MOTION TO ALLOW IT TO


CALCULATE THE REQUIRED INTERSECTIONS.
But you are allowed one line in the program without an X or Y move.

CANCEL THE COMPENSATION AS SOON AS YOU HAVE FINISHED WITH IT


Do not try and be clever and machine more than one feature even if you have to
re apply it somewhere else on the component.

ALWAYS CANCEL COMPENSATION IN A MOVE COMMAND


G00 or G01 is good try not to use G02 or G03.

ALWAYS REMOVE THE COMPENSATION AT 90 DEGREES TO THE LAST PROGRAM


MOVE
Note: This means revert back to the centre line of the cutter programming

FIRST - THERE ARE THREE G CODES USED IN CUTTER COMPENSATION AND THESE ARE

G40 THIS MEANS CANCEL


G41 THIS MEANS TO THE LEFT
G42 THIS MEANS TO THE RIGHT
But when we say LEFT or RIGHT what do we mean?

47
This machining centre compensation type allows the programmer to forget about
each tool's length as the program is written. Instead of having to know the exact
length of each tool and tediously calculating Z axis positions based on the tool's
length, the programmer simply instates tool length compensation on each tool's
first Z axis approach movement to the workpiece.
At the machine during setup, the operator will input the tool length compensation
value for each tool in the corresponding offset. This, of course, means the tool
length compensation value must first be measured.
If tool length compensation is used wisely, the tool length compensation value
can be measured off line (in a tool length measurement gage) to minimize setup
time. With this method, the tool length compensation value is simply the length
of the tool.
This value compensates for the differences in length between the tools used. The
tool length is the distance between the tool holder ref. point and the tip of the
tool. This length is measured and entered in CNC control together with wear
values. On basis of this data the CNC control calculates the traversing movements
in the feed direction.
Many CNC controls allow the length of the tool to be used as the offset value. One
popular command to instate tool length compensation is G43. Within the G43
command, the programmer includes an H word that specifies the number of the
offset containing the tool's length.
Here is an example program that utilizes tool length compensation with two
tools. The program simply drills two holes (one with each tool). Notice that tool
length compensation is being instated in lines N015 and N055.
And program would be:
O0001 (Program №)
N005 T01 M06 (Place tool № one in the spindle)
N010 G54 G90 S400 M03 T02 (Select coordinate system, absolute mode, start
spindle CW at 400 RPM, get tool № two ready)
N013 G00 X1.0 Y1.0 (Rapid to first XY position)
N015 G43 H01 Z.1 M08 (Instate tool length compensation on first Z move, turn
on coolant)
N020 G01 Z-1.5 F4. (Drill hole)
N025 G00 Z.1 M09 (Rapid out of hole, turn off coolant)
N030 G91 G28 Z0 M19 (Return to tool change position, orient spindle)
N035 M01 (Optional stop) N040 T02 M06 (Place tool № two in spindle)
N045 G54 G90 S400 M03 T01 (Select coordinate system, absolute mode, start
spindle at 400 RPM, get tool № one ready)
N050 G00 X2. Y1. (Rapid to first XY position)
N055 G43 H02 Z.1 M08 (Instate tool length compensation on tool's first Z move,
turn on coolant)
N060 G01 Z-1.2 F5.5 (Drill hole)

48
N065 G00 Z.1 M08 (Rapid out of hole, turn off coolant)
N070 G91 G28 Z0 M19 (Return to tool change position, orient spindle)
N075 M30 (End of program)

To turn compensation on, the machine must move at least the distance of the
nose radius in X and Z. For easy calculations, back away from the start point 0.1
in Z and 0.2 in X. Remember X is diameter based, so 0.2 in X is actually 0.1
radially.

A G42 Example
We will program ONLY the finish pass on this part using G42 right tool nose
radius compensation. We are given 800fpm cutting speed and 0.006ipr feed.

Finish Pass:

49
As stated, this feature varies dramatically in use from one control model to the
next. You must reference your control manufacturer's programming manual to
learn more about how tool length compensation applies to your particular
machining centre. Sizing with tool length compensation.
In similar fashion, the CNC operator will not know for certain whether the tool
length compensation value is perfectly correct until the first workpiece is
machined. Say for example, the tool length measurement was made incorrectly.
During the measurement, the operator finds the tool to be 6.5372 in long. But the
actual tool length is 6.5355 in. In this case, the tool would machine slightly
shallower in Z that it is supposed to. After machining, the minor depth change
can be made by adjusting the offset, NOT THE PROGRAM.
In some cases, even if the tool length value is measured perfectly, other
problems may cause the tool not to machine to the proper depth. If, for example,
the workpiece or setup is quite weak, tool pressure may cause the workpiece to
tend to push away from the tool doing the machining.
For critical surfaces or when tool pressure is unpredictable, the operator can even
trial cut the workpiece under the influence of an offset slightly LARGER than the
measured value to ensure that some excess stock will be left. After machining,
the operator can measure the surface to determine precisely how much offset
change is necessary to machine the workpiece to size.

TOOL OFFSET MEASURING SAMPLE:


Tool Length Offsets (TLO's) are easily measured using the optional DeskCNC
Digitizing Probe/Tool Sensor. There are several methods for machining with

50
TLO's. Below lists just one method.
TLO's are measured using the M96 or M97 codes. M96 moves to the Tool Sensor
Location defined in menu Setup - Machine Setup - Digitizing Probe. M97 does not
move to location but rather moves directly 'down' to the tool sensor. M97 is used
when the tool sensor is manually moved/placed under the tool for measurement.
M96 is used when the tool sensor is semi-permanently mounted to a fixed
location on the machines table.
Measuring TLO's:
1. If using M96, set the tool sensor location in menu Setup - Machine Setup - Tool
Sensor - X/Y Location along with the Tool Sensor Height. The Sensor Height is
relative for this method of calculating TLO's so it does not have to be entered
exactly. Make certain that the Default Lim Polarity is set to Normally Closed when
using the Digitizing Probe or Tool Sensor.
2. Tool Changes are executed using a Tx M6 combination. A tool needs to be
loaded for the M96/M97 commands to function. Enter T1M6 in the MDI box and
press Enter. The Tool 1 'Tool Change Script' will be executed (Tool Change
Scripting). Tool 1 should now be in the Spindle.
3. Place the Tool Sensor under the tool and Enter M97 in the MDI box. TLO's are
measured using the current feedrate. Enter a new feedrate (F) if warranted.
4. The Spindle will lower the Tool to the Sensor and record the TLO. The TLO will
be active. The TLO for Tool 1 will NOT be saved in the Tool Library until you save
the Tool Library from menu Setup - Tool Library - Save. You can measure all tools
and then save the entire table.
5. Once a TLO has been measured, it will need to be active when machining. This
is done with the G43 Hx command where x is the tool number. The G43 Hx may
be placed in the Tool Change Script.
6. When the Spindle is Zeroed, the Active TLO is used.
Using TLO's when machining:
1. Place the first tool used in your GCode file in the Spindle. Do this be entering
T1M6 (assumes Tool 1) in the MDI box. The tool change script for Tool 1 will be
executed. The Tool Change Script should include the G43 H1 command to make
the TLO for tool 1 active. The TLO readout in DeskCNC will display the current
TLO.
2. Zero the tool to the part material. The Z
Coordinate will reflect the active TLO.
3. Run the GCode file. All subsequent tool calls will
place the tip of each tool at the proper Z Height
according to their TLO.

Cutter radius compensation

Just as tool length compensation allows the


machining centre programmer to forget about the
tool's length, so does cutter radius compensation
allow the programmer to forget about the cutter's
radius as contours are programmed. While it may
be obvious, let us point out that cutter radius
compensation is ONLY used for milling cutters and
only when milling on the periphery of the cutter.
You would NEVER consider using cutter radius
compensation for a drill, tap, reamer, or other hole
machining tool.

51
Activation and deactivation tool radius compensation:

Cutter rad. Compensation will be cancelled with G40.


- If the programmed tool path is on left of the material to be machined, the
radius compensation is to be selected with G41.
- If the programmed tool path is on right of the material to be machined, the
radius compensation is to be selected with G42.

G codes for cutter compensation while

Turning. G41 causes the tool to be offset to the left of the programmed tool-path
and G42 directs the tool to be offset to the right. Cutter compensation activates
on the first linear move after the compensation code is called. Compensation is
cancelled with G40 code.

TO DETERMINE WHICH IS LEFT OR RIGHT?

STAND ON THE TOOL, OR DRAW AN EYEBALL BEHIND THE TOOL. LOOK IN THE
DIRECTION THE TOOL TRAVELS WHILST CUTTING AND ASK YOUR SELF IS THE
TOOL TO THE LEFT OF THE WORK PIECE OR TO THE RIGHT OF THE WORK
PIECE?

52
DO NOT LET THE COMPENSATION DECIDE THE DIRECTION OF CUT FOR YOU.

Reasons for cutter radius compensation


Let's begin by discussing four reasons why cutter radius compensation is not only
required, but also very helpful to the CNC user.
1. Program coordinates are easier to calculate
Without cutter radius compensation, machining centre programmers must
program the centreline path of all milling cutters. An example program using this
technique was shown during our discussion of motion types (key concept number
three). When programming centreline path, the programmer must know the
precise diameter of the milling cutter and calculate program movements based on
the tool's centreline path.
With cutter radius compensation, the programmer can program the coordinates of
the work surface, NOT the tool's centreline path. This eliminates the need for
many calculations.
Keep in mind that we are now talking about manual programming. If you have a
CAM (computer aided manufacturing) system, your CAM system can probably
generate centreline path just as easily as work surface path.
2. Range of cutter sizes
Say you do program centreline path for a given workpiece contour and do not use
cutter radius compensation. Say you have programmed based on a one inch
diameter tool. But when the job is to be run, you find that your company does
not have any one inch end mills. Say the closest you have is a 0.875 in cutter. In
this case, the entire cutter path would have to be changed in the program to

53
match the new cutter size. With cutter radius compensation, handling this
problem is as simple as changing an offset value.
3. Easy sizing
As with tool length compensation, the operator can use the cutter radius
compensation offset to help with sizing. If the contour is not coming out to size
(possibly due to tool pressure), an offset can be changed to allow for the
imperfection.
4. Roughing and finishing
This is also a manual programming related reason for using cutter radius
compensation. If contours must be rough and finish milled, cutter radius
compensation allows the programmer to use the same programmed coordinates
needed to finish mill the workpiece to rough mill the workpiece. This keeps the
programmer from having to calculate to sets of milling coordinates (one for
roughing and one for finishing). To leave stock for finishing during the rough
milling, the operator will simply make the cutter radius compensation offset value
slightly larger than the cutter's actual size. This will keep the cutter away from
the surface being milled and leave the desired finishing stock. Tip: When chips
start to change colour, always reduce speed-not feed!
How to program cutter radius compensation
This is example of assignment of tools and tool offsets in a circular tool magazine
The usage of cutter radius compensation does vary from one control to the next.
Additionally, each control will have a set of strict rules that specify how cutter
radius compensation is instated, used, and cancelled. Here we just show the
basics of how it is programmed and give an example for how it is used on one
popular control model. You must refer to your CNC control manufacturer's manual
for more on your particular control.
Most controls use three G codes with cutter radius compensation. G41 is used to
instate a cutter left condition (climb milling with a right hand cutter). G42 is used
to instate a cutter right condition (conventional milling). G40 is used to cancel
cutter radius compensation. Additionally, many controls use a D word to specify
the offset number used with cutter radius compensation.
To determine whether to use G41 or G42, simply look in the direction the cutter
is moving during machining and ask yourself if the cutter is on the left or right
side of the surface being machined. If on the left, use G41. If on the right, use
G42.
Pictures above shows some examples that should help you understand how to
determine whether to use G41 or G42 to instate. Drawings show how to
determine whether to use G41 or G42 to instate cutter radius compensation.
Once cutter radius compensation is properly instated, it the cutter will be kept on
the left side or right side (depending on whether G41 or G42 is used to instate) of
all surfaces until the G40 command to cancel compensation.
Example of tool diameter compensation program:
Tool No T01 when D21 = 15000
The radius of end mill becomes the same dimension as that of the offset vector
(arrow mark).
Absolute values:
T01 M06
G90 G54 G00 X0 Y0 S300
(G43) Z3. (H01)
M03
G90 G17 G00 G41 X100. (D01) Start up left side offset
G01 Z-25. F2000 The radius value of end mill offset has been
set to
Y60. F120 D01
X140. Y80. This block is either G00 or G01
G02 X180. Y40. R40.
X160.Y20. R20.

54
G01 X99.
G00 Z30.
G40 X0 Y0 Cancel mode
M05
M91 G28 Z0

Haas: Cutter compensation can only be turned on and off in G00 (rapid) or G01
(linear) mode. After you‘ve turned it on and before you start cutting, you must
make a linear move that is the same or greater than the radial compensation
value in your offset. If your radial cutter comp is set at 0.5‖, for instance (for a 1‖
diameter tool), then you must make a linear cut of at least that length before you
start cutting. Here‘s how the program would look:

T01 M06
G54 G00 X3.6 Y0.0 S500 M03 (X = 3.6)
G43 Z1. H01
G01 Z-0.25 F50.0
(X = 3.0, a move of 0.6, allowing
G01 G41 X3.0 D01 F10.0
Y-1.0 cutter comp of 0.5 to be established)
G01 G40 X3.6
G91 G28 Z0
M30

Setting Tooloffsets
You need to determine the offsets for the tools you are using in the tool library.

1. Select the tool by commanding a tool change in MDI mode by either writing code or
pressing ATC/FWD or ATC/REV to load the first tool into the spindle.

2. End Mill in the -z direction


close to the top of the vise

55
Slowly jog the tool in the Z-Direction and stop when you get close to the top of the stock
or the vise, or wherever you have programmed the z-zero coordinate location for your
part. (CAUTION: DO NOT have the spindle rotating while setting tool offsets!)

3. Contact with the surface

Switch to 0.001" or 0.0001" increment and place a slip of paper between the tip of the
tool and the surface you are setting for the z-zero. The next step takes some eye-hand
coordination and very small increments when jogging. You will now move the tool tip in
the Z-direction while constantly sliding the paper back and forth on the face. You want to
stop jogging the tip down when you just feel the tip "grabbing" the paper.

4. At this point you know that the tool tip is offset from the surface by the thickness of your
sheet of paper.

5. Handle job button

Press the OFSET button and page up or down to the tool offsets page.

6. Store the tool offset

56
Highlight the tool number you are setting and press the TOOL OFSET MEASURE button.
You will see a new number appear in the column "GEOMETRY". With the number
highlighted, type in " - 0.003" and hit ENTER. The number will decrement by that
amount.

This is the same thing we did when we subtracted the radius of the edge finder. (0.003"
is an approximate thickness of a sheet of paper, but you may want to measure it to be
sure).

7. Move up in the Z direction

Jog the tool in the POSITIVE z-direction away from the face to move on to the next tool.
(NOTE: If you accidentally jog in the negative z direction, you will very quickly break the
tool. If you want to avoid this DO NOT USE THE JOG HANDLE to move the tool up. Simply
push and hold the "+Z" arrow above the JOG LOCK button and the tool will safely move
up from the surface(or just press the ATC FORWARD button while in the MDI mode. If the
spindle is down it will automatically go up to the tool change position height).

The success of any milling operation depends, Before setting up a job, be


sure that the to a great extent, upon judgment in setting up the job,
workpiece, the table, the taper in the spindle, selecting the proper milling
cutter, and holding the cutter by the best means under the circumstances
Some fundamental practices have been proved by experience to be
necessary for and the arbor or cutter shank are all clean and good results
on all jobs. Some of these practices are mentioned below…

 Before setting up a job, be sure that the workpiece, table, the taper
in the spindle, and the arbor or cutter shank are free from chips,
nicks, or burrs.
 Do not select a milling cutter of larger diameter than is necessary.
 Check the machine to see if it is in good running order and properly

57
lubricated, and that it moves freely, but not too freely in all
directions.
 Consider direction of rotation. Many cutters can be reversed on the
arbor, so be sure you know whether the spindle is to rotate clockwise
or counterclockwise.
 Feed the workpiece in a direction opposite the rotation of the milling
cutter (conventional milling).
 Do not change feeds or speeds while the milling machine is in
operation.
 When using clamps to secure a workpiece, be sure that they are tight
and that the piece is held so it will not spring or vibrate under cut.
 Use a recommended cutting oil liberally.
 Use good judgment and common sense in planning every job, and
profit from previous mistakes.
 Set up every job as close to the milling machine spindle as
circumstances will permit.

CUTTER COMPENSATION EXAMPLE

Material aluminium
Mill the profile 8.0mm deep
Machine in a clock wise direction

Tool H No D No Rpm Feed


20mm 01 31 3000 400
Endmill

Program
O0003
G21
G40 G80 G49 G17 cancellations
G91 G28 Z0 reference return to be able to tool change
N1 T1 M6 (20 Dia end mill) select tool -1 and put it in the spindle
G0 G90 G56 X-15.0 Y-15.0 move to the start position to machine
S3000 M3 start the spindle
G43 Z-8.0 H01 M8 advance the tool in Z
G41 X0 D31 apply comp to the left on this move
G1 Y44.0 F400 cut to pos.-1
G2 X60.0 Y50.0 R6.0 cut circle to pos.-2
G1 X64.0 cut to pos.-3
G2 X70.0 Y44.0 R6.0 cut circle to pos.-4

58
G1 Y6.0 cut to pos.-5
G2 X64.0 Y0 R6.0 cut circle to pos.-6
G1 X6.0 cut to pos.-7
G2 X0 Y6.0 R6.0 cut circle to pos.-8
G0 G40 X-15.0 Z10.0 M9 cancel comp an lift in Z
G91 G28 Z0 reference return the Z axis
G49 H00 M01 cancel the tool length offset
G28 Y0 reference the Y axis (park the table)
M30 end of program reset & rewind

TO ANALYSE WHAT HAS ACTUALLY HAPPENED ON THE MACHINE


SEE THE NEXT PAGE.

To analyse what has taken place in the machining program O0003:

Pictorially as shown in here we positioned the cutter after tool change at X-15.0 Y-15.0
We then applied the compensation in a move command (rapid) to X0.
We offset this move of 15 mm to the left of the next program move which was to cut up
the Y axis.
The offset amount contained in offset 31 would be 1/2 the size of the tool (10mm).
So the resultant move the machine will make is 5 mm.
By adjusting the value in the offset we can adjust the size of the component being
machined to take care of broken tools or tool wear.
We can use any size of tool up to 30 mm diameter which when used in conjunction with
this program would result in no move being made when the comp is applied.
But should we set an offset that is 0.001 mm bigger than 15.0 mm then the machine says
I have to move in the opposite direction to what is required RESULT = ALARM

Dimensional tool (wear) offsets


This compensation type applies only to turning centres. When setting up tools, it
is infeasible to expect the setup person to perfectly set each tool into position. It
is likely that some minor positioning problem will exist. And even if all tools could
be perfectly positioned, as any single point turning or boring tool begins cutting,
it will begin to wear. As a turning or boring tool wears, the tool wear will affect
the size of the workpiece being machined.
For these reasons, and to allow easy sizing of turned workpieces, dimensional tool
offsets are required (also called simply tool offsets). Tool offsets are instated as
part of a four digit T word. The first two digits command the tool station № and

59
the second two digits command the offset number to be instated. The command
T0101, for example, rotates the turret to station № 1 and instates offset № 1. It
is wise to always make the number of the primary offset used with a tool the
same as the tool station №.
NOTE: When a tool offset is instated, the control actually shifts the entire
coordinate system by the amount of the offset. It will be as if the operator could
actually move the tool in the turret by the amount of the offset.
Each dimensional offset has two values, one for X and one for Z. The operator will
have control of what the tool does in both axes as the workpiece is being
machined. Here's an example that should help you understand how dimensional
tool offsets work. Say you have written a program to use tool number one (with
offset number one) to turn a three inch diameter. After machining the three inch
diameter, it is measured and found to be 3.005 in. That is, the workpiece is 0.005
in oversize. In this case, the X value of offset number one will be reduced by
0.005 in. When the program is run again, tool number one will machine the
workpiece 0.005 smaller.
How to guarantee your first workpiece comes out on size
If working on an engine lathe, manually turning a precise diameter, you would
first allow the tool to skim cut to find out exactly where the tool is located. After
skim cutting, you can determine precisely how much to turn the crank or handle
to make the tool turn the desired diameter.
In the same way, you can use dimensional tool offsets to ensure that any tool will
not violate the workpiece on its first cut. Outside diameter turning tools, for
example, could be offset slightly plus in X to ensure that some excess stock is
left. Inside diameter bored holes could be offset slightly minus in X for the same
purpose. In either case, the first time the tool is run, the operator can rest
assured that the workpiece will come out with some excess finishing stock (it will
NOT be scrapped). After machining the first time, the surface can be measured.
The operator will then adjust the corresponding offset accordingly and re-machine
with the tool this time the surface will be machined perfectly to size. Using this
technique on each tool in the program will almost guarantee that the first
workpiece will not be scrapped.

Tool nose radius compensation (turning centres)

This turning centre compensation type is very similar to cutter radius


compensation. In fact the same three G codes are used. G41 instates tool nose
radius compensation in a tool left condition. G42 instates with a tool right
condition. G40 cancels tool nose radius compensation. For this reason, minimize
our discussion of tool nose radius compensation to avoid repeating information.
Just as cutter radius compensation allows the programmer to program work
surface coordinates (not allowing for tool radius), so does tool nose radius
compensation.

60
Notice that the tool nose radius will cause
deviations from the required work surface if not considered during programming.

Just as cutter radius compensation allows the programmer to program work


surface coordinates, so does tool nose radius compensation. Figure 5 stresses
why tool nose radius compensation is required. As you can see, when work
surface coordinates are programmed, the tool's radius will cause deviations from
the work surface on circular and angular motions.

To determine G41 or G42, simply look in the direction the tool is moving
during the cut and ask yourself which side of the workpiece the tool is on. If the
tool is on the left, use G41 (this would be the case when boring toward the
chuck). If the tool is on the right, use G42 (turning toward the chuck). Once you
determine which to use, include the proper G code in the tool's first approach to
the workpiece. Once tool nose radius compensation is instated, it remains in
effect until cancelled.

Keep in mind that the tool nose radius is quite small (usually 1/64, 1/32, 3/64,
or 1/16 inch), meaning the deviation from the work surface caused by the tool
radius will also be quite small. It is possible that if you are only chamfering
corners to break sharp edges, you may not need tool nose radius compensation.
However, if the surfaces being machined are critical (morse taper, for example),
you must compensate for the radius of the tool. Also, you should only need tool
nose radius compensation when finishing. It can cause problems if used during
roughing operations due to the constant reversals in direction.

Keep in mind that the tool nose radius is quite small (usually 1/64, 1/32, 3/64, or
1/16 in); meaning the deviation from the work surface will also be quite small. It
is possible that if you are only chamfering corners to break sharp edges, you may
not need tool nose radius compensation. However, if the surfaces being machined
are critical (Morse taper, for example), you must compensate for the radius of the
tool. NOTE: you should only need tool nose radius compensation when finishing.
You should not use it for roughing operations.

Other types of compensation


The compensation types shown have been for machining centres and turning
centres. But all forms of CNC equipment have some form of compensation to
allow for unpredictable situations. Here are some other brief examples.
CNC Wire EDM machines have two kinds of compensation. One, called wire offset
works in a very similar way to cutter radius compensation to keep the wire
centreline away from the work surface by the wire radius plus the overburn
amount. It is also used to help make trim (finishing) passes using the same series
of motion coordinates.
The second form of compensation for wire EDM machines is taper cutting. For
machining the clearance angle needed with dies and form tools, the programmer

61
can easily specify the direction of the taper (left or right) and the angle desired.
The operator fills in some offsets to tell the control the position of the upper guide
relative to the workpiece and the control does the rest.
Laser cutting machines also have a feature like cutter radius compensation to
keep the laser the radius of the laser beam away from the surface being
machined. CNC press breaks have a form of compensation to allow for bend
allowances based on the workpiece material and thickness. Generally speaking, if
the CNC user is faced with any unpredictable situations during programming, it is
likely that the CNC control manufacturer has come up with a form of
compensation to deal with the problem.

5. LANGUAGE ELEMENTS AND PROGRAMMING


LANGUAGE
The following characters are available for writing CNC programs:
Upper case:
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
Numerals:
0,1,2,3,4,5,6,7,8,9
Please note: Take care to differentiate between the letter “O” and the numeral
“0”.
We use special characters as well (especially for writing programs on an external
PC), but we will learn it later.
Address
,,Alphabet‖ is particularly called ,,address‖:…G90…G00…X-12.354 Letters G, G,X
are address.
Data
Numerals (including decimals, symbols) following the address (alphabet), are
called data: G90…G00…X-12.354…in this case… 90…00…-12.354 are data.

Word
NC programs are made up of blocks and each block is made up of words.
A word in the NC language consists of an address character and a digit or
sequence of digits representing an arithmetic value. The address character of the
word is usually a letter. The sequence of digits can contain a leading sign and
decimal point. The leading sign always appears between the address letter and
the sequence of digits. The positive leading sign(+) does not have to be specified.
Address + data is called ,,word‖:…G90 is a word…X-12.354 is a word.
Block №
An NC program consists of individual blocks. A block generally consists of several
words. A block should contain all the data required for performing an operation
step and is terminated with the end of block character (EOB).
In order to keep the block structure as clear as possible, the words in a block
should be arranged as follows:
N10 G…X…Y…Z…F…S…T…D…M…H…
The interval between EOB (CR) and EOB is expressed as a block:
G90 G00 X-12.354 all this is a block or
G01 Y11.20 F45 ,,
M08 ,,
Sequence №
Initial part of block can be attached with number by numerals within 8 digits
following the address №
It is called ,,Sequence №. It is not related with machining but only to help us
when look for some sequence №.
Program №

62
Be sure to use max. 8 digit numeral, after inputting O which is mark for head of
program. It is always on beginning of program. Don‘t forget the program without
Program № cannot be registered in CNC memory.
Example: O1111

Program ends always with : M30 or in some cases as: M99


So, one program is certainly starts with Program № and it ends with M30 or M99.
M30 mean the end of main program
M99 is end of program
*There is two types of programs:
1. Main program, and
2. Sub-program

Main program means that there is Program № on the head and M30 at the end.
Sub-program means that there is Program № at the head, and that there is M99
on the end of program.

Programming type and explanations


O 1234 (test program) …………………O - Program № (O0001~O00000000)
G17 G40 G80 G98
G91 G28 Z0……………………………………….G- G functions
G28X0Y0…………………………………………. G28- Auto zero point return
G91G30X0Y0Z0M19……………………….. G30- Second reference point return
N001 (120mm FACE)……………………….N- Sequence №
T02 M06……………………………………………T- Tool № in ATC
G54G90G00X…Y…S…T…
G43Z…H…
M03…………………………………………………..M- M code
G01Z…F…
X…F…………………………………………………..F- cutting feed
M98P98……………………………………………..M98- Sub-program call
N002 (12 mm DRILL)
G54G90G00X…Y…S…T…………………...S- Spindle speed selection
G43Z…H……………………………………………G43…H…Tool length compensation
M03
G98G81R…Z…F………………………………….G73~G89 Canned cycles
X…Y………………………………………………….. X,Y,Z Coordinate word
M98P98
N005 (15mm ENDMILL)
T…M06…
G54G90G00X…Y…S…T…………………..G54~G59 Work coordinate system
G43Z…H…
M03G00Z……………………………………G00, G01 Positioning, Linear interpolation
G01Z…F…
G02X…Y…R………………………………..G02, G03 Circular interpolation

63
G01X…Y…
G41X…Y…D………………………………..G41, G42, D Tool dia. compensation
M98P98
M30…………………………………………..M30 Program end

6. FORMATING PROGRAMS
Reason for formatting of programs
Before start writing programs we have to know how to how to format it.
As stated during key concept number one, the CNC control will execute a CNC
program in sequential order exactly as it is written. All commands necessary to
make the machine do the required operations must be included in the CNC
program in the proper order. And of course, part of learning how to program is
understanding the program structure a CNC machine requires.
To this point, you have been exposed to several features and programming
functions related to programming. With all the new ideas and commands
introduced, you may be getting somewhat confused trying to keep them all
straight. You may be worried about how you're going to memorize all of this.
1. One of the main reasons to strictly format CNC programs has to do with
making it easy to write your first few programs. When writing your first program,
the related commands will by no means be memorized. However, if you have
good example formats to go by, writing your first few programs will be much
easier.
We relate this to driving a car. It is unlikely that any driver can recite from
memory all road signs used to direct traffic. However, when a driver sees a road
sign, it is quite likely the driver will recognize its meaning. In the same way, it is
unlikely that even an experience CNC programmer could recite every word used
with CNC programming. But when even a relative newcomer to CNC sees a
command, it is likely its meaning will be remembered. One of our intentions with
program formatting is to keep you from having to memorize all commands
needed for programming. Instead, you will be looking at an example and simply
recollecting the function of each command.
2. A second reason for strict program formatting is consistency. Once you have
a format that works, use it. If you use the same format (or structure) for all
programs you write, you will be able to repeat past successes. If all programmers
in you company use the same format for a given CNC machine, each programmer
will be easily able to work on another's program.
3. The third (and most important) reason for strictly formatting programs is
related to multi tool jobs. Almost all CNC machining centre and turning centre
programs require that more than one tool in the program. For this kind of
program, there will be MANY times when it will be necessary to rerun only one
tool in the program a second, third, or fourth time.
Say for example, you have a machining centre program that uses ten tools. After
running a work-piece, you determine that the fifth tool in the program did not go
quite deep enough. After fixing the problem (changing tool offset or Z position in
program), you will need to run the fifth tool again. However, you would NOT want
to run the entire program just to get to tool number five. Doing so would be a
waste of time and may actually cause unwanted problems with workpiece
accuracy and finish. Instead, you will want to be able to run ONLY tool five a
second time.
To do so will require that ALL information necessary to get the machine running
(just like at the beginning of the program) is included at the beginning of tool
five. If the programmer makes certain assumptions related to modal information
from a previous tool, it may not be possible to run tool number five by itself.

64
Here is an example of a time when the programmer must include some redundant
information at the beginning of a tool in order to give the ability to rerun the tool.
In our previous ten tool example, we still wish to run tool number five a second
time. Say that tools four and five both run at 500 RPM. Say the last tool in the
program (tool number ten) runs at 1500 RPM. Spindle speed is modal. The
programmer may decide to leave out the S500 word at the beginning of tool five,
expecting it to carry over from tool four. After running the entire program, it is
determined that tool number five did not go deep enough. The operator fixes the
problem and intends to run only tool number five. In this case, tool number five
will start at the same spindle speed as the last tool in the program (1500 RPM),
not 500 RPM! This is but one time when redundant information must be
programmed from tool to tool in order to give the capability to rerun tools.
At the beginning of each tool, the programmer MUST include all information
necessary to begin the tool, even if it means including some redundant
information. In essence, the programmer must treat each tool as a mini-program
that can run separate from the rest of the program. When you think about it, this
actually simplifies the programming task, allowing the programmer to break a
seemingly complicated multi-tool program into smaller and easier to handle
pieces. Each tool makes up one piece of the program.

Kinds of program format


For machines that have the ability to perform operations with several tools, there
are four kinds of program format:
1.program start-up format,
2.tool ending format,
3.tool start-up format, and
4.program ending format.
The CNC programmer will begin every program with program start-up format. At
the completion of program start-up format, the tool will be ready to begin cutting.
At this point, the programmer will program the cutting operations with the first
tool. When finished cutting, the programmer will follow the format to end the tool
(tool ending format). Then tool start-up format to begin the second tool. The
programmer will then toggle among cutting information, tool ending format and
tool start-up format until the finished cutting with the last tool. At this point, the
programmer will follow the format to end the program.
For an example of the four kinds of program format, refer to the program given
during our discussion of tool length compensation (key concept № 4). This
program uses two tools and follows the strict format we are now discussing. Let's
determine what commands are related to each kind of format.
The first four commands (beginning with the program number) makeup the
program start-up format. At the completion of line N015, the tool is ready to
begin machining. Lines N020 and N025 makeup the cutting commands for the
first tool. (In line N030, the feed-rate should be considered part of program start-
up format.) Lines N030 and N035 form the tool ending format. Lines N040
through N055 are tool start-up format. (In line N060, the feed-rate should be
considered part of tool start-up format.) Lines N060 and N065 are the cutting
commands for the second tool. And lines N070 and N075 are program ending
format.
By breaking up the program in this manner, you should be able to see just how
much of the program is nothing more than program format that can be copied
from one program to another. Of course, certain word values like spindle speeds,
feed-rates, axis positions, and tool station and offset numbers will change based
on the program you are currently writing. But the basic structure can be copied,
keeping you from leaving out important information. Note that there are only four
commands that do any cutting in this program. The bulk of the program is just
format.
How do you come up with program format information for your machine?

65
The best way is to take an example program that is currently running successfully
and break it up in the manner shown above. When doing this, analyse just what
each tool is doing to determine the various types of format. Ensure that each tool
contains all information needed to run independently.

Program configuration
A program is composed of following sections:
-Leader
-Program start
-Program section
-Comment
-Program end
NOTE: If you are working from scratch with a new CNC machines and have no
examples to go by, contact your machine tool builder to gain an understanding of
how your programs should be formatted. You may also find example programs
given within your machine tool builder's programming manual.

7. LET‘S START WRITING CNC PROGRAMS

The actual programming of the individual operation steps in the NC language


generally only represents a small proportion of the work in the development of an
NC program.

Programming of the actual instructions


should be preceded by the planning and
preparation of the operating steps. And the
more accurately you consider how the NC
programmes to be structured and organized,
faster and easier it will be to produce a complete program which is clear and free
of errors. A CNC programmer should be and must be able to visualize the motions
made by cutting tools in a program.
Clearly structured programs are a particular advantage if you need to make
changes at the later date.
Since different parts do not all look the same, it is naturally inadvisable to
develop every program according to the same method. However, certain
procedures apply in most cases and these are presented on the following pages of
this course in the form of a checklist:
1. Prepare the work-piece drawing
-Define the work-piece zero
-Sketch in the coordinate system
-Calculate any missing coordinates
- Programming sample for turning application
2. Define machining sequences
-What tools you are going to use, when and to machine which operation?
-In what order are the individual elements of the workpiece manufactured?
-Which individual elements are repeated (or also rotated) and because of that
should be stored in a subprogram?
-Do these or similar contour sections already exist in other part of programs or
subprograms which could be used here?

66
Were is it advisable or necessary to perform zero offset, rotation, mirroring or
scaling?
3. Create a machining plan
Define all the machining processes in steps:
-Rapid traverse movements for positioning
-Tool change positions
-Tool retractions for recalibrations
-Switching the spindle and coolant on and off
-Calling tool data
-In-feed (feeding)
-Path correction
-Approach to the contour
-Retract from the contour
-etc.
4. Translate the work steps into the programming language
Enter each individual step in an NC block or more blocks.
5. Combine all the individual steps in a program

Telling the machine what to do - the CNC program


Almost all current CNC controls use a word address format for programming. (The
only exceptions to this are certain conversational controls.) By word address
format, we mean that the CNC program is made up of sentence-like commands.
Each command is made up of CNC words. Each CNC word has a letter address
and a numerical value. The letter address (X, Y, Z, etc.) tells the control the kind
of word and the numerical value tells the control the value of the word. Used like
words and sentences in the English language, words in a CNC command tell the
CNC machine what it is we wish to do at the present time.

One very good analogy to what happens in a CNC program is found in any set of
step by step instructions. Say for example, you have some visitors coming in
from out of town to visit your company. You need to write down instructions to
get from the local airport to your company. To do so, you must first be able to
visualize the path from the airport to your company. You will then, in sequential
order, write down one instruction at a time. The person following your
instructions will perform the first step and then go on to the next until he or she
reaches your facility.

In similar manner, a manual CNC programmer must be able to visualize the


machining operations that are to be performed during the execution of the
program. Then, in step by step order, the programmer will give a set of
commands that makes the machine behave accordingly.

Though slightly off the subject at hand, we wish to make a strong point about
visualization. Just as the person developing travel directions MUST be able to
visualize the path taken, so MUST the CNC programmer be able to visualize the
movements the CNC machine will be making BEFORE a program can be
successfully developed. Without this visualization ability, the programmer will not
be able to develop the movements in the program correctly. This is one reason
why machinists make the best CNC users. An experienced machinist should be
able to easily visualize any machining operation taking place.

Just as each concise travel instruction will be made up of one sentence, so will
each instruction given within a CNC program be made up of one command. Just
as the travel instruction sentence is made up of words (in English), so is the CNC
command made up of CNC words (in CNC language).

67
The person following your set of travel instructions will execute them explicitly. If
you make a mistake with your set of instructions, the person will get lost on the
way to your company. In similar fashion, the CNC machine will execute a CNC
program explicitly. If there is a mistake in the program, the CNC machine will not
behave correctly.

Program:
O0001 (Program number)
N005 G54 G90 S400 M03 (Select coordinate system, absolute mode, and
turn spindle on CW at 400 RPM)
N010 G00 X1. Y1. (Rapid to XY location of first hole)
N015 G43 H01 Z.1 M08 (Instate tool length compensation, rapid in Z to
clearance position above surface to drill, turn on coolant)
N020 G01 Z-1.25 F3.5 (Feed into first hole at 3.5 inches per minute)
N025 G00 Z.1 (Rapid back out of hole) N030 X2. (Rapid to second hole)
N035 G01 Z-1.25 (Feed into second hole)
N040 G00 Z.1 M09 (Rapid out of second hole, turn off coolant)
N045 G91 G28 Z0 (Return to reference position in Z)
N050 M30 (End of program command)
While the words and commands in this program probably do not make much
sense to you (yet), remember that we are stressing the sequential order by which
the CNC program will be executed. The control will first read, interpret and
execute the very first command in the program. Only then will it go on to the
next command. Read, interpret, execute. Then on to the next command. The
control will continue to execute the program in sequential order for the balance of
the program. Again, notice the similarity to giving any set of step by step
instructions.

Other notes about program makeup


As stated programs are made up of commands and commands are made up of
word. Each word has a letter address and a numerical value. The letter address
tells the control the word type. CNC control manufacturers do vary with regard to
how they determine word names (letter addresses) and their meanings. The
beginning CNC programmer must reference the control manufacturer's
programming manual to determine the word names and meanings. Here is a brief
list of some of the word types and their common letter address specifications.

 O - Program number (Used for program identification)


 N - Sequence number (Used for line identification)
 G - Preparatory function
 X - X axis designation
 Y - Y axis designation
 Z - Z axis designation
 R - Radius designation
 F – Feed-rate designation
 S - Spindle speed designation
 H - Tool length offset designation
 D - Tool radius offset designation
 T - Tool Designation
 M - Miscellaneous function (See below)

As you can see, many of the letter addresses are chosen in a rather logical
manner (T for tool, S for spindle, F for feed-rate, etc.). A few require
memorizing.

68
There are two letter addresses (G and M) which allow special functions to be
designated. The preparatory function (G) specifies is commonly used to set
modes. We already introduced absolute mode, specified by G90 and incremental
mode, specified by G91. These are but two of the preparatory functions used. You
must reference your control manufacturer's manual to find the list of preparatory
functions for your particular machine.

Like preparatory functions, miscellaneous functions (M words) allow a variety of


special functions. Miscellaneous functions are typically used as programmable
switches (like spindle on/off, coolant on/off, and so on). They are also used to
allow programming of many other programmable functions of the CNC machine
tool.

To a beginner, all of this may seem like CNC programming requires a great deal
of memorization. But rest assured that there are only about 30-40 different words
used with CNC programming. If you can think of learning CNC manual
programming as like learning a foreign language that has only 40 words, it
shouldn't seem too difficult.

Decimal point programming

Certain letter addresses (CNC words) allow the specification of real numbers
(numbers that require portions of a whole number). Examples include X axis
designator (X), Y axis designator (Y), and radius designator (R). Almost all
current model CNC controls allow a decimal point to be used within the
specification of each letter address requiring real numbers. For example, X3.0625
can be used to specify a position along the X axis.

On the other hand, some letter addresses are used to specify integer numbers.
Examples include the spindle speed designator (S), the tool station designator
(T), sequence numbers (N), preparatory functions (G), and miscellaneous
functions (M). For these word types, most controls do NOT allow a decimal point
to be used. The beginning programmer must reference the CNC control
manufacturer's programming manual to find out which words allow the use of a
decimal point.

Programming samples:
Experience and judgment are extremely valuable in selecting the correct milling
feeds. Even though suggested rate tables are given. remember that these are
suggestions only. Feeds are governed by many variable factors, such as the
degree of finish required. Using a coarse feed, the metal is removed more rapidly
but the appearance and accuracy of the surface produced may not reach the
standard desired for the finished product. Because of this fact, finer feeds and
increased speeds are used for finer, more accurate finishes, while for roughing, to
use a comparatively low speed and heavy feed. More mistakes are made on over-
speeding and underfeeding than on under-speeding and overfeeding.

Over-speeding may be detected by the occurrence of a squeaking, scraping


sound. If vibration (referred to as chattering) occurs in the milling machine during
the cutting process, the speed should be reduced and the feed increased. Too
much cutter clearance, a poorly supported work-piece, or a badly worn machine
gear are common causes of chattering.

69
Next Sample:

70
Point Commanded coordinates
1&7 X80000 Z20400
2 X18500 Z20400
3 X18500 Z12000
4 X19000 Z12000
5 X19000 Z10000
6 X20000 Z10000

A process sheet for the program is given below:

In this example, sample programming for straight line cutting is executed. The
machining origin (work-piece or program zero point) can be established as
desired.. It is desirable, however, to set it at the centre of the chucked side face
of the work-piece as shown for easy programming and to minimize programming
errors.
When the machining origin is established at the point as mentioned above,
dimensions of diameter are directly designated as X value, and the longitudinal
dimensions are programmed as the distance from the origin in Z value.

71
Programming sample for circular arc cutting

72
Programming example:

N110 F95 S850 M03


N115 G00 X+25 Y+30
N120 G01 Z-8
N125 X+105
N130 Y+80
Explanation:
Block-No.
N110 A feed-rate of 95 mm/min and a spindle speed of 850 U/min is
programmed.
N115 The tool is moved in the rapid traverse motion from its current position to
the
starting point ( X+25 Y+30)t
N120 In-feed in the Z-axis at the programmed feed-rate (G01)
N125 Because G01 is a modal command, the tool will continue to move at the
programmed feed-rate on a straight line to the target position X=105
N130 The tool moves in the Y-axis to the target position Y=80
The technology data programmed in block N110 (feed-rate, speed and sense of
cutter rotation) will be retentive and take effect through blocks N120 to N130.

Programming sample machining a groove


Machining of a groove: the tool travels from the starting point to the end point in
the X/Y direction. In-feed takes place simultaneously in the Z direction.
N10 G17 S400 M03
N20 G00 X30. Y30. Z2.
N30 G01 Z-10. F40
N40 X80. Z-20.
N50 G00 Z100.
N60 M30

73
Milling a groove

The example bellow shows the programming of a contour by application of a


program part repetition (routine) (G23). Alternatively this contour description
may be stored as a sub-program to be invocated by (G22).

74
Example program showing three types of motion.

G01 X ( ) ( ) ( ) ( ) ( ) ( ) Y ( ) ( ) ( ) ( ) ( ) Z ( ) ( ) ( ) ( ) ( ) ( ) F ( ) ( ) ( ) ( )
CR
By commands as programmed in the above format, a cutting tool will be moved
at a specified federate (f word) along a straight line path to a specified coordinate
point (X, Z).When programming use claiming way of tool motion.
In this particular example, we are milling around the outside of a workpiece
contour. Notice that we are using a one inch diameter endmill for machining the
contour and we are programming the very centre of the end mill. Later, during
the course, we will discuss a way to actually program the workpiece contour (not
the cutter centreline path). While you may not understand all commands given in
this program, concentrate on understanding what is happening in the motion
commands (G00, G01, and G02/G03). With study, you should be able to see what
is happening. Messages in parentheses are provided to document what is
happening in each command.
Sample of program:
O0002 (Program number)
N005 G54 G90 S350 M03 (Select coordinate system, absolute mode, and start
spindle CW at 350 RPM)
N010 G00 X-.625 Y-.25 (Rapid to point 1)
N015 G43 H01 Z-.25 (Instate tool length compensation, rapid tool down to work
surface)
N020 G01 X5.25 F3.5 (Machine in straight motion to point 2)
N025 G03 X6.25 Y.75 R1.0 (CCW circular motion to point 3)
N030 G01 Y3.25 (Machine in straight motion to point 4)
N035 G03 X5.25 Y4.25 R1.0 (CCW circular motion to point 5)
N040 G01 X.75 (Machine in straight motion to point 6)
N045 G03 X-.25 Y3.25 R1.0 (CCW circular motion to point 7)
N050 G01 Y.75 ((Machine in straight motion to point 8)
N055 G03 X.75 Y-.25 R1.0 (CCW circular motion to point 9)
N060 G00 Z.1 (Rapid away from work piece in Z)
N065 G91 G28 Z0 (Go to the machine's reference point in Z)
N070 M30 (End of program)

Keep in mind that CNC controls do vary with regard to limitations with motion
types. For example, some controls have strict rules governing how much of a full
circle you are allowed to make within one circular command. Some require
directional vectors for circular motion commands instead of allowing the R word.
Some even incorporate automatic corner rounding and chamfering, minimizing
the number of motion commands that must be given. Though you must be
prepared for variations, and you must reference your control manufacturer's
programming manual to find out more about your machine's motion commands,
at least this presentation has shown you the basics of motion commands and you
should be able to adapt to your particular machine and control with relative ease.

Example of Fanuc Turning cycle:


G71 for the 0T control.
Here is what you want to achieve: Turn a 4" piece down to a 2" diameter, 1" back
in the length direction. The part is already faced, so we only do the rough turning
and leave a little stock for finishing.
O1000(Program number)
N1 G50 S2500(Max speed)
N2 T0101
N3G96 S600 M3(Speed in SFM for 1018 Steel)
N4 G0 X4.0 Z.1 M8(Rapid to OD of part, .1" away from face, turn coolant on)
N5 G71 U.15 R.02(U=cutting depth, R= pullaway distance after each cut)

75
N6 G71 P7 Q9 U.05 W.005 F.015(P7 tells the control to look at N7 and Q9 to
look at N9, this is
how we give the motions describing the part.
U is the amount of stock left for finishing on the OD, W is the amount left on
the shoulder.
N7 G0 X2.0
N8 G1 Z-1.0
N9 X4.0
N10 G0 X6.0 Z6.0 M9(Rapid back to a position clear of the part, turn coolant
off)
N11 M30( End of program)
Notes: The 6T version has a single line and so do various Yasnac controls,
they look like this:
N5 G71 P7 Q9 U.05 W.005 D1500 F.015(D= depth of each pass and has to be
given as a value
without a decimal point)
This cycle is normally followed by G70( Finish Cycle) after tool change to a
finish tool. Rapid to the
same position for the start of the G71, then program G70 P7 Q9.

Typical mistakes:

Typical mistakes made by the programmer and how you can diagnose these
problems as they occur are:

1. Syntax mistakes are made when the control is not able to execute the
command given to the machine and it‘s usually made when a program is
entered manually.
2. Motion mistakes are harder to diagnose and since they deal with motion
they‘re generally caused by incorrect coordinates. Even if a CNC program
is perfectly written, there can still be errors made during the set-up
calculations.
3. Measurements, like tool lengths and diameters, may have to be made
regarding the setup and numbers entered into the control before the
program is executed.
4. Omission mistakes are forgetful mistakes when a manual programmer
leaves a decimal point out or forgets to put in the feed rate.

Another procedure used to verify programs has to do with the feed hold button.
Always having a finger on the feed hold button is a good idea in case an
unexpected rapid motion takes place. Also the machine lock and dry run switches
allow the control to scan the program for syntax mistakes. During the program,
the spindle will come on, the turret will index, and the control will appear to be
actually running the program. A free flowing dry run is a check for motion
problems. During this procedure, the operator will turn the machine lock switch to
its lowest position and set the rapid override switch to its slowest motion rate.
Sometimes this procedure may be repeated several times to make sure the
motions are correct. Before running the first workpiece, the operator must
execute the cycle once more with the dry run switch turned off. This allows the
operator to see one thing that could not be seen during a free flowing dry run.

There are some procedures that can help ensure the tool will machine precisely to
size:

1. Consider what the tool will be machining.

76
2. Adjust the tool offsets for the tool to machine to size and check to see what
direction it‘s leaving excess stock.
3. Allow the tool to completely machine the workpiece.

Measure what the tool has done, rerun the tool, and confirm measurements that
the new offset values are correct.

Even though these safety and verification procedures seem like a great deal of
work, it is easily justified when compared to the possible losses and
consequences of down time.

Practical example of CNC program


Machining plate ,,DFL‖ Setting by using sensor.(See last chapter)

Selection of machining position:


a) Bottom face and surrounding 4 faces are already machined by previous
process
b) 30mm boring hole is punched at bottom hole 25mm
c) Face cutting
d) Tapping
e) 30 dia boring

Setting of selected cutting conditions of tool cutter

77
Selecting cutting conditions for each particular tool is crucial in process of
programming. It requires knowledge and experience.

Mounting method
Clamp with vice-mouth piece by taking a step:

78
Relation with Work-coordinate system
By the specified procedure and work standard face (manual), make touch sensor
contact with P1>P2>P3 thereby –X, _Y can be set automatically to the desired
work coordinate (G54~G59)

Make touch sensor contact to 1 point (top face of workpiece), thereby, Z- is set at
work coordinate (G54~G59) of CRT screen. Z0 face is memorized in machine.
Before machining is started, the automatic running check of created program
should be done by, DRY RUN” function, if program can operate.

Face cutter 95 dia.


O1968 Program number
G91 G28 Z0 M31 Z axis machine zero point return, chip conveyer starts
G91 G28 X0 Y0 Return lamp lights on X and Y axis

79
G00 G17 G40 G49 G64 G80 G90 G98 Set the inside of NC head at initial state.
M01 Optional stop
N101 (95 dia. cutter T01 H01) Sequence number, memo writing
T01 M06 Tool no 1 to spindle by tool change
G54 Work coordinates G54
G68 Coordinate rotation automatic setter
effective.
G90 G00 X260.Y115.S320 T02 Absolute spindle rotation320, calling next tool T02
G43 Z30. H01 Tool length compensation No.H1 is effective. Tool
nose is positioned to Z30.
M03 Spindle starts forward turn.
G01 Z0 F3000 Tool nose reach to Z0 face (finishing face)
G00 X-60. Y115. F320 Cutting, feeding 320 m/min to column side of chip
G00 Z30. Escape of Z axis up to the height of approach once
X260. Y35. X…Y…positioning with rapid traverse
G01 Z0 F3000 Reaching Z axis Z0 face with speed 3000mm/min
G01 X-60.Y35. F320 Cutting
G69 Coordinate rotation cancel
M01 Stop with switch ON (optional stop) while
passing with OFF

Boring 30dia
N102 (30mm BORING T02 H02) the inside ( ) of sequence No means memo.
T02 M06 Toolchange T2 to spindle by ATC operation
G54 Work coordinates G54
G68 Coordinate rotation automat. Setter active
G90 G00 X30.Y75.S800 T03 Absolute, X,Y, Spindle speed selection800prm,
Calling T03 in waiting position,
G43 Z30. H02 Tool length compensation H02 plus side offset, tool
nose position Z30.
M03 Spindle forward turn ON
G98 G81 R3.0 Z-22. F160 Boring canned cycle, initial point return, cutting
start position 3mm frontward, 22 depth
X100.Y75. XY positioning, other operations are the same as
those of previous block.
X170. Y75. XY same as the above
G69 Cord. Rotation cancel
G80 Canned cycle cancel
M01 Optional stop

80
Centre 18mm
N103 (CENTER 18MM T03 H03)
T03 M03 With ATC T03 to spindle
G54
G68
G90 G00 X50. Y125. S1200 T04 During X…Y… positioning operation, spindle
speed is selected, 1200rpm, T04 call
G43 Z30. H03 Offset of tool length H03 alone to Z plus side
M03
G99 G81 R3.0 Z-5.5 F120 L0 With R point return, and drill canned cycle L0,
no operation is made by this block
M98 P100 To subprogram of hole position coordinate
G69
G80
M01

Drill 8.5mm
N104 (DRILL 8.5MM T04 H04)
T04 M06
G54
G68
G90 G00 X50. Y125. S820 T05 Coordinate rotation effective 820rpm selection
and T05 call during the movement of work
coordinate G54.
G43 Z30. H04 Offset of H04 value to Z axis plus side, tool
nose to Z30. position

81
M03
G99 G81 r0 Z-24. F164 L0 With R point return and drill canned cycle L0,
no operation is made by this block
M99 P100 To subprogram of hole pos. coordinate
G69
G80 Canned cycle cancel
M01 Optional stop

Tapping M10
N105 (TAP M10xP1.5 T05 H05)
T05 M06
G54
G68
G90 G00 X50.Y125. S320 T06 Spindle speed selection 320rpm, next tool
T06 Call
G43 Z30. H05
M03
G98 G84 R10. Z-25. F480 L0 Initial point return, with tap canned cycle L0, in
this block no tapping operation is done.
M98 P100 Tap canned cycle hole position to the same
subprogram as in lower hole.
G69
G80
M01

82
Boring finishing 30mm
N106 (BORING FINISHING 30MM T06 H06)
T06 M06
G54
G68
G90 G00 X30. Y75. S1600 T01 Initial tool T01 call
G43 Z30. H06
M03
G99 G76 R2. Z-22. Q0.5 F96 R point return with canned cycle of
finishing Boring.
X100.Y75. The above operation XY positioning,
after the boring operation is done
X170.Y75. Same as the above
G69
G80
M01
G91 G28 Z0 M05 Z axis point return. spindle turn stop
G28 X0 Y0 X, Y axis zero point return
M30 End of program

How to obtain the cutting conditions


METAL CUTTING FORMULAS:
CUTTING SPEED:
Vc=‫ * ה‬D * n/1000 m/min

Spindle speed (rpm)


N=V∕ 31.4 × D × 1000 N/n - Spindle speed (rpm)
V - Cutting speed (min)
D - Tool diameter (mm)

Cutting feed rate


F=N×fr F – Cutting speed (mm/min)
F=N×P (tapping case pitch) N – Spindle speed (min-¹)

F=N×fz×t (case of front milling) fr – Feed amount per one rotation


End mill fz – Feed amount per one blade
t - № of blades

83
Example G03

%:1004
N05 G90 G20 G17
N10 M06 T2
N15 M03 S1200
N20 G00 X2 Y0.5
N25 Z0.125
N30 G01 Z-0.125 F5
N35 X3 F15
N40 G03 X3.5 Y1 R0.5 (G03 ARC USING R VALUE)
N45 G01 Y3
N50 G03 X3 Y3.5 I-0.5 J0 (G03 ARC USING I AND J)
N55 G01 X2
N60 G03 X2 Y1.5 I0 J-1 (180 DEGREE ARC USING I AND J)
N65 G01 Y0.5
N70 G00 Z0.1
N75 X1.5 Y2.5
N80 G01 Z-0.25 F5
N85 G03 X1.5 Y2.5 I0.5 J0 (FULL CIRCLE USING I AND J)
N90 G00 Z1
N95 X0 Y0
N100 M05
N105 M30

Tips:

Rectangular coordinate system for X-Y plane. The program zero point
establishes the point of reference for motion commands in a CNC program. This
allows the programmer to specify movements from a common location. If
program zero is chosen wisely, usually coordinates needed for the program can
be taken directly from the print.

84
Drilling centre

CNC PROGRAMING EXAMPLES:


Sample of program for CNC lathe:

85
Sample of program for CNC lathe:
O 185 (Program №)

G28 U-5. W0 (Reading home position)


G50 S2500
G10 P0 X0 Z285.82
G00 U-10. W50.

N1111 M02
N1 G00 G97 S1500 M03 T500
M98 P1111 (subprogram call for geometry offsets)
X45. Z50. T5
Z34.2 M08
G01 X-1.5 F0.1
G00 Z35. X45.
Z33.125
G01 X-1.5 F0.1
G00 Z34. X40.
G01 X34.5 F.1
X23. F0.1
G00 X35.5 Z34.
X31.7
G01 X33.25 Z32. F0.1
Z26.62
G00 X100. Z200. T0

N2 G00 G97 S1300 T300 M03


X0.7 Z50. T3
Z25. M08

86
G01 Z-37. F0.12
G00 Z50.
X200. Z200. T0

N3 G00 G97 S1300 M03 T600


X45. Z50. T6
Z26.5 M08
G01 X30.75 F0.1
G00 X36.
Z27.5
G01 X30.75 F0.1
G00 X45.
X100. Z200. T0

N4 G00 G97 S100 M03 T800


X40. Z50. T8
X26.61 Z33.5 M08
G01 Z31.066 X23.85 F0.1
Z-37. U-25.
G00 X23.5
Z50. M09
X100. Z200. T0 M05
T500
M99 P1111

Subprogram for geometry offsets:


O 1111

G10 P10003 X52.2 Z108.89 (P10003 … tool No 3)


G10 P10005 X56.6 Z 5.7
G10 P10006 X49.9 Z 0.4
G10 P10008 X35.8 Z75.39
M99

Sample of program for machining centre:

O 0003 (MAIN PROGRAM)

N2 G91 G28 Z0
N4 M61 (PALLET 1 IN)
N6 M98 P0058
N8 M01
N10 G91 G28 Z0
N12 M62 (PALLET 2 IN)
N14 M98 P0059
N16 M01
N20 M99

O 0058
N2 G10 G90 L2 P1 X-119.8 Y103.8 Z-613.4
N4 G10 G90 L2 P2 X120.8 Y103.5 Z-613.4
N6 G10 G90 L2 P3 X-120.45 Y103.3 Z-613.7
N8 G10 G90 L2 P4 X121.2 Y103.4 Z-613.7
N10 M98 P0098 (tool change pos)

T31 M06 (CUTTER)

87
B90
/G00 G90 G54 G43 X21. Y130. Z60.2 S250 M3 H31 T33
M47
/M98 P101
G00 G90 G55 G43 X21. Y130. Z60.2 S250 M3 H31 T33
M98 P101
G00 G91 G28 Z0
B270
/G00 G90 G56 G43 X21. Y130. Z60.2 H31
/M98 P101
G00 G90 G57 G43 H31 X21. Y130. Z60.2
M98 P101
M98 P0098 (tool change pos)
T33 M6 (T33 R/BORE)
B270
G00 G90 G57 G43 X0 Y150. Z6. S350 M03 H33 T34
M47
M98 P103
/G00 G90 G56 G43 X0 Y150. Z6. H33
/M98 P103
G00 G91 G28 Z0
B90
G00 G90 G54 G43 X0 Y150. Z6. H33 S350 M3 T34
M98 P103
G00 G90 G55 G43 X0 Y150. Z6. H33
M98 P103
M98 P0098 (tool change pos)
T34 M6 (T34 STAGE B/BAR)
B90
/G00 G90 G54 G43 X0 Y100. Z25. S420 M03 H34 T35
M47
/M98 P104
G00 G90 G55 G43 X0 Y100. Z25. S420 M03 H34 T35
M98 P104
G00 G91 G28 Z0
B270
G00 G90 G57 G43 X0 Y100. Z25. H34
M98 P104
/G00 G90 G56 X0 Y100. Z25.
/M98 P104
M98 P0098
T35 M06 (T35 CENTRE DEX)
B270
/G00 G90 G56 G43 X-115. Y-8.95 Z120. S1000 M03 H35 T36
M47
/M98 P105
G00 G90 G57 G43 X-115. Y-8.95 Z120. S1000 M13 H35 T36
M98 P105
G00 G91 G28 Z0
B90
/G00 G90 G54 G43 X-115.Y-8.95 Z120. H35 S1000 M03 T36
/M98 P105
G00 G90 G55 X-115. Y-8.95 Z-13. H35 M08
M98 P105
M98 P0098
T36 M06 (T36 8.2MM DRILL)
B90

88
/G00 G90 G54 G43 X-83. Y-8.85 Z120. S2300 M03 H36 T37
M47
/M98 P106
G00 G90 G55 G43 X-83. Y-8.95 Z120. S2300 M03 H36 T37
M98 P106
G00 G91 G28 Z0
B270
/G00 G90 G56 G43 X-83. Y-8.95 Z120. H36
/M98 P106
G00 G90 G57 X-83. Y-8.95 Z120. H36
M98 P106
M98 P0098
T37 M06 (T37 ROUGH SEAL GROOVE)
B270
/G00 G90 G56 G43 X0 Y100. Z25. S700 M03 H37 T38
M47
/M98 P107
G00 G90 G57 G43 X0 Y100. Z25. S700 M03 H37 T38
M98 P107
G00 G91 G28 Z0
B90
G00 G90 G55 G43 X0 Y100. Z25. H37 S700 M03 T38
M98 P107
/G00 G90 G54 X0 Y100. Z25.
/M98 P107
M98 P0098
T38 M6 (T38 FINISH BOOT GROOVE)
B90
/G00 G90 G54 G43 X0 Y150. Z30. S960 M03 H38 T39
M47
/M98 P108
G00 G90 G55 G43 X0 Y150. Z30. S960 M03 H38 T39
M98 P108
G00 G91 G28 Z0
B270
G00 G90 G57 G43 X0 Y150. Z30. H38
M98 P108
/G00 G90 G56 X0 Y150. Z30.
/M98 P108
M98 P0098
T39 M6 (T39 FINISH BORE)
B270
/G00 G90 G56 G43 X0 Y150. Z5. S650 M03 H39 T40
M47
/M98 P109
G00 G90 G57 G43 X0 Y150. Z5. S650 M03 H39 T40
M98 P109
G00 G91 G28 Z0
B90
/G00 G90 G54 G43 X0 Y150. Z5. H39 S650 M03 T40
/M98 P109
G00 G90 G55 X0 Y150. Z5. H39
M98 P109
M98 P0098
T40 M6 (T40 FINISH SEAL GROOVE)
B90
/G00 G90 G54 G43 X0 150. Z20. S1450 M03 H40 T2

89
M47
/M98 P110
G0 G90 G55 G43 X0 Y150. Z20. S1450 M03 H40 T2
M98 P110
G00 G91 G28 Z0
B270
G00 G90 G57 G43 X0 Y150. Z20. H40
M98 P110
/G00 G90 G56 X0 Y150. Z20.
/M98 P110
M98 P0098
T2 M6 (T2 289MM DIA S&F CUTTER)
B90
/G00 G90 G54 G43 X0 Y200. Z59.19 S200 M03 H41 T31
M47
/M98 P112
G00 G90 G55 G43 X0 Y200. Z59.19 S200 M03 H41 T31
M98 P112
G00 G91 G28 Z0
B270
/G00 G90 G56 G43 X0 Y200. Z59.19 S200 M03 H41
/M98 P112
G00 G90 G57 X0 Y200. Z59.19 S200 M03 H41
M98 P112
M98 P0098 (tool change pos)
G90 M99

O 0059 (SUBPROGRAM)

N2 G10 G90 L2 P1 X-120.3 Y102.4 Z-607.0


N4 G10 G90 L2 P2 X120.10 Y102.4 Z-607.0
N6 G10 G90 L2 P3 X-119.8 Y102.65 Z-607.45
N8 G10 G90 L2 P4 X120.65 Y102.4 Z-607.45
N10 M98 P0098

T31 M06 (CUTTER)


B90
G00 G90 G54 G43 X21. Y130. Z60.2 S250 M3 H31 T33
M47
M98 P101
G00 G90 G55 G43 X21. Y130. Z60.2 S250 M3 H31
M98 P101
G00 G91 G28 Z0
/B270
/G00 G90 G56 G43 X21. Y130. Z60.2 H31
/M98 P101
/M98 P0098
T33 M06 (T33 ROUGH BORE)
/B270
/G00 G90 G57 G43 X0 Y150. Z6. S350 M03 H33 T34
M47
/M98 P103
/ G0 G90 G43 G56 X0 Y150. Z6. S350 M03 H33 T34
/M98 P103
/G00 G91 G28 Z0
B90
G00 G90 G54 G43 X0 Y150. Z6. H33 S350 M03 T34

90
M98 P103
G00 G90 G55 X0 Y150. Z6. H33 S350 M03
M98 P103 M98 P0098
T34 M06 (T34 STAGE B/BAR)
B90
G00 G90 G54 G43 X0 Y100. Z25. S420 M03 H34 T35
M47
M98 P104
G00 G90 G55 G43 X0 Y100. Z25. S420 M03 H34
M98 P104
G0 G91 G28 Z0
/B270
/G00 G90 G57 G43 X0 Y100. Z25. H34
/M98 P104
/G00 G00 G56 X0 Y100. Z25.
/M98 P104
M98 P0098
T35 M06 (T35 CENTRE DEX)
/B270
/G00 G90 G56 G43 X-115. Y-8.95 Z120. S1000 M03 H35 T36
M47
/M98 P105
/G00 G90 G57 G43 X-115. Y-8.95 Z120. M03 S1000 H35 T36
/M98 P105
/G0 G91 G28 Z0
B90
G0 G90 G54 G43 X-115. Y-8.95 Z120. H35 S1000 M03 T36
M98 P105
G00 G90 G55 X-115.Y-8.95 Z120. H35 S1000 M03
M98 P105
M98 P0098
T36 M06 (T36 8.2MM DRILL)
B90
G00 G90 G54 G43 X-83. Y-8.85 Z120. S2300 M03 H36 T37
M47
M98 P106
G00 G90 G55 G43 X-83.Y-8.95 Z120. S2300 M03 H36
N126 M98 P106
N128 G00 G91 G28 Z0
/N130 B270
/N132 G00 G90 G56 G43 X-83.Y-8.95 Z120.H36
/N134 M98 P106
/N136 G00 G90 G57 X-83.Y-8.95 Z-13.
/N138 M98 P106
N140 M98 P0098
N142 T37 M6 (T37 ROUGH S/GROOVE)
/N144 B270
/N146 G00 G90 G56 G43 X0 Y100.Z25.S700 M03 H37 T38
M47
/N148 M98 P107
/N150 G00 G90 G43 G57 X0 Y100.Z25.H37 M03 S700 T38
/N152 M98 P107
/N154 G00 G91 G28 Z0
N156 B90
N158 G00 G90 G55 G43 X0 Y100.Z25.H37 S700 M03 T38
N160 M98 P107
N162 G00 G90 G54 X0 Y100.Z25.S700 M03

91
N164 M98 P107
N166 M98 P0098
N168 T38 M6 (T38 FINISH B/GROOVE)
N170 B90
N172 G00 G90 G54 G43 X0 Y150.Z30.S960 M03 H38 T39
M47
N174 M98 P108
N176 G00 G90 G55 G43 X0 Y150.Z30.S960 M03 H38
N178 M98 P108
N180 G00 G91 G28 Z0
/N182 B270
/N184 G00 G90 G57 G43 X0 Y150.Z30.H38
/N186 M98 P108
/N188 G00 G90 G56 G56 X0 Y150.Z30.
/N190 M98 P108

N192 M98 P0098


N194 T39 M6 (T39 FINISH BORE)
/N196 B270
/N198 G00 G90 G56 G43 X0 Y150.Z5.S620 M03 H39 T40

M47
/N200 M98 P109
/N202 G00 G90 G43 G57 X0 Y150.Z5.M03 S650 H39 T40
/N204 M98 P109
/N206 G00 G91 G28 Z0
N208 B90
N210 G00 G90 G54 G43 X0 Y150.Z5.H39 S650 M03 T40
N212 M98 P109
N214 G00 G90 G55 X0 Y150.Z5.H39 S650 M03
N216 M98 P109
N218 M98 P0098
N220 T40 M6(T40 FINISH S/GROOVE)
N222 B90
N224 G00 G90 G54 G43 X0 Y150.Z20.S1450 M03 H40 T2
M47
N226 M98 P110
N228 G00 G90 G55 G43X0 Y150.Z20.S1450 M03 H40
N230 M98 P110
N232 G00 G91 G28 Z0
/N234 B270
/N236 G00 G 90 G57 G43 X0 Y 150.Z20.H40
/N238 M98 P110
/N240 G00 G90 G56 X0 Y150.Z20.
/N242 M98 P110
N244 M98 P0098
N272 T2 M6(289 DIA S & F CUTTER)
N274 B90
N276 G00 G90 G54 G43 X0 Y200.Z59.19 S200 M03 H41 T31
M47
N278 M98 P112
N280 G00 G90 G55 G43 X0 Y200.Z59.19 S200 M03 H41 T31
N282 M98 P112
N284 G00 G91 G28 Z0
/N286 B270
/N288 G00 G90 G56 G43 X0 Y200.Z59.19 S200 M03 H41

92
/N290 M98 P112
/N292 G00 G90 G57 X0 Y200.Z59.19 S200 M03
/N294M98P112
N296 M98 P0098
N298 G90 M99

Example of program for drilling center:

DRILLING CENTER
0001 ( HOUSING MAIN PRG.)

N2 G90 G10 L2 P1 X151.58 Y153.44 Z-545.3


N4 G90 G10 L2 P2 X205.38 Y-153.70 Z-545.3
N6 G90 G10 L2 P3 X335.35 Y-153.27 Z-545.3
N8 G90 G10 L2 P4 X389.07 Y-153.57 Z-545.3 Haas Machining centre
N10 G90 G10 L2 P5 X152.96 Y-301.26 Z-546.7
N12 G90 G10 L2 P6 X216.96 Y-301.21 Z-546.7
N14 G80 G40 G91 G28 X0 Y0 Z0
N16 M51 (side 1)
N18 M53
N20 M50
N22 M98 P0414
N24 M00
N26 G90 G10 L2 P1 X151.85 Y-153.26 Z-546.
N28 G90 G10 L2 P2 X205.56 Y –153.54 Z-546.
N30 G90 G10 L2 P3 X335.70 Y-153.54 Z-546.
N32 G90 G10 L2 P4 X389.06 Y-153.50 Z-546
N34 G90 G10 L2 P5 X152.78 Y-301.48 Z-546.7
N36 G90 G10 L2 P6 X216.74 Y-301.76 Z-546.7
N38 G80 G40 G91 G28 X0 Y0 Z0
N40 M51 (side 2)
N42 M52
N44 M50
N46 M98 P414
N48 G91 G28 Z0
N50 G28 X0 Y0
N52 M30

0414 (P3 housing subprogram)


M06 (T1 12MM CORE DRILL)
G0 G90 G54 G43 X-58. Y-15 Z0 S1800 M03 H01 T02
G98 G81 Z-106. R-75. F300 M11
X58.Y-15.
G55 G43 X58. Y15.
X-58. Y15.
G56 X-58 Y-15.
X58. Y-15.
G57 X58. Y15.
X-58. Y15.
G0 G80 G91 G28 Z0 X0 M09
G30 Y0
M06 (T2 16MM CORE DRILL)
G0 G90 G54 G43 X60. Y14.Z0 S1800 M03 H02 T03
G98 G81 Z-105. R-48. F300 M08
G55 X60. Y-14.
G56 X60. Y14.

93
G57 X60. Y-14
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T3 19MM CORE DRILL)
G0 G90 G54 G43 X-60. Y14. Z0 S1300 M03 H03 T04
G98 G73 Z-104.5 R-48. Q15. F150 M08
G55 X-60. Y-14.
G56 X-60. Y14.
G57 X-60. Y-14.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T4 16.05 MM REAMER)
G0 G90 G54 G43 X60. Y14. Z0 S750 M03 H04 T05
G98 G81 Z-104. R-48. F300 M08
G55 X60. Y-14.
G56 X60. Y14.
G57 X60. Y-14.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T5 5.6 B. DRILL)
G0 G90 G54 G43 Y-12.983 X-9.352 Z0 S4000 M3 H05 T06
G98 G81 Z-56.25 R-40. F500 M08
G55 Y12.983 X-9.352
G56 Y12.983 X-9.352
G57 Y12.983 X-9.352
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T6 40.MM CENTRE DEX)
G0 G90 G54 G43 X-60. Y14. Z0 S2000 M3 H06 T07
G98 G81 Z-61. R-48. F100
G55 X-60. Y-14.
G56 X-60. Y14.
G57 X-60. Y-14.
G57 X60. Y-14. Z-52. R-48.
G56 X60. Y14.
G55 X60. Y-14.
G54 X60. Y14.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T07 32.0MM CENTREDEX)
G0 G90 G54 G43 Y-3. X23.3 Z0 S2000 M3 H07 T08
G98 G81 Z-41. R-35. F180 M08
G55 Y3. X23.3
G56 Y-3. X23.3
G57 Y3. X23.3
G57 Y21. X-7. Z-46.6 R-40. F70
G56 Y-21. X-7.
G55 Y21. X-7.
G54 X-21. X-7.
G54 Y-17.5 X-59.5 Z-80. R-73.
G55 Y17.5 X-59.5
G56 Y-17.5 X-59.5
G57 Y17.5 X-59.5
G57 Y17.5 X59.5
G56 Y-17.5 X59.5
G55 Y17.5 X59.5
G54 Y-17.5 X59.5

94
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T8 45‘ CENTRE DRILL)
G0 G90 G54 G43 X-9.352 Y-12.983 Z0 S2000 M3 H08 T09
G98 G81 Z-49.5 R-45. F200 M08
Y-17.9 X9. Z-53.5 R-45.
Y3. X23.3 Z-45.8 R-38.
G55 Y3. X23.3 Z-45.8 R-38.
Y17.9 X9. Z-53.5 R-45.
Y12.983 X-9.352 Z-49.5 R-45.
G0 G90 G56 G43 X-9.352 Y-12.983 Z0 S2000 M3 H08
G98 G01 Z-49.5 R-45. F200 M08
Y-17.9 X9. Z-58.5 R-45.
Y-3. X23.3 Z-45.8 R-38.
G57 Y3. X23.3 Z-45.8 R-38.
Y17.9 X9. Z-53.5 R-45.
Y12.983 X-9.352 Z-49.5 R-45.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T9 ROUGH C/BORE)
G0 G90 G54 G43 X60. Y14. Z0 S800 M3 H09 T10
G98 G81 Z-55.5 R-48. F70 M08
G55 X60. Y-14.
G56 X60. Y14.
G57 X60. Y-14.
G58 X0 Y0
G59 X0 Y0
G59 X0 Y108.
G59 X0 Y172.08
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T10 FINISH SPOT TOOL)
G0 G90 G54 G43 X60. Y14. Z0 S500 M3 H10 T11
G98 G81 Z-56. R-50. F50 P300 M8
G55 X60. Y-14.
G56 X60. Y14.
G57 X60. Y-14.
G58 X0 Y0
G59 X0 Y0
G59 X0 Y108.
G59 X0 Y172.08
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T11 9MM CARBIDE DRILL)
G0 G90 G54 G43 Y-17.9 X9. Z0 S3000 M3 H11 T12
G98 G81 Z-66. R-45. F300 M08
G54 Y-3. X23.3 Z-52.8 R-40.
G55 Y3. X23.3 Z-52.8 R-40.
G55 X17.9 X9. Z-66. R-45.
G56 Y-17.9 X9. Z-66.8 R-45.
G56 Y-3. X23.3 Z-52.8 R-40.
G57 Y3. X23.3 Z-52.8 R-40.
G57 Y17.9 X23.3 Z-66. R-45.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T12 23.MMSPOT FACE)
G0 G90 G54 G43 Y-17.9 X9. Z0 S300 M3 H12 T13

95
G0 Z-37. M8
G01 Z-48.5 F40
G04 P300 (dwelling)
G0 G90 Z0
G0 G55 X9. Y17.9
G0 Z-37.
G01 Z-48.5 F40
G04 P300
G0 G90 Z0
G0 G56 Y-17.9 X9.
G0 Z-37. M08
G01 Z-48.5 F40
G04 P300
G0 G90 Z0
G0 G57 X9. Y17.9
G0 Z-37.
G01 Z-48.5 F40
G04 P300
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T13 3.2MM DRILL)
G0 G90 G54 G43 Y-3. X23.3 Z0 S2000 M3 H13 T14
G98 G81 Z-67. R-45. F200 M08
G55 Y3. X23.3
G56 Y-3. X23.3
G57 Y3. X23.3
Nedostaje…
G30Y0
M06 (T14 M10X1 TAP)
G0 G90 G54 G43 Y-17.9 X9. Z0 S300 M3 H14 T15
G98 G84 Z-66. R-40. F300 P0 M8
Y-3 X23.3 Z-50.8 R-35.
G55 Y3. X23.3
Y17.9 X9. Z-66. R-40.
G56 Y-17.9 X9.
Y-3 X23.3 Z-50.8 R-35
G57 Y3. X23.3
Y17.9 X9. Z-66. R-40.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M06 (T15 6.6 CARBIDE DRILL)
G0 G90 G54 G43 Y-22.5 X-39. Z0 S3500 M3 H15 T01
G98 G81 Z-103. R-87. F400 M08
G54 Y22.5 X39.
G55 Y22.5 X39.
G55 Y22.5 X-39.
G56 Y-22.5 X-39.
G56 Y-22.5 X-39.
G57 Y22.5 X39.
G57 Y22.5 X-39.
G0 G91 G80 G28 Z0 X0 M09
G30 Y0
M99

8. SPECIAL PROGRAMMING FEATURES

96
Other programmable functions
All but the very simplest CNC machines have programmable functions other than
just axis motion. With today's full blown CNC equipment, almost everything about
the machine is programmable. CNC machining centers, for example, allow the
spindle speed and direction, coolant, tool changing, and many other functions of
the machine to be programmed. In similar fashion, CNC turning centers allow
spindle speed and direction, coolant, turret index, and tailstock to be
programmed. And all forms of CNC equipment will have their own set of
programmable functions. Additionally, certain accessories like probing systems,
tool length measuring systems, pallet changers, and adaptive control systems
may also be available that require programming considerations.

The list of programmable functions will vary dramatically from one machine to the
next, and the user must learn these programmable functions for each CNC machine to
be used. In key concept number two, we will take a closer look at what is typically
programmable on different forms of CNC machine tools.
Canned cycles (G73 ~ G89) - Functions to simplify
programming

Simplest explanation of that function would be: They simplifying a program by


using a single block containing functions to specify the machining operations
usually specified in several blocks. It is applied on operations such as drilling,
boring, spot facing, tapping.

Canned cycles:
-----------------------------------------------------------------------------------------------------
G code Drilling Operation at the Retraction Application
(-Z direction) Bottom of a hole (+ Z
direction)_________________________________________________________________
___ -----------------------------------------------------------------------------------------------
------
G73 Intermittent _ Rapid traverse High speed peck
feed drilling cycle
G74 Feed Spindle CW Feed Left-hand
tapping cycle
G76 Feed Oriented spindle Rapid traverse Fine boring cycle
Stop
G80 _ _ _ Cancel
G81 Feed _ Rapid traverse Drilling cycle,
Spot drill.
cycle
G82 Feed Dwell Rapid traverse Drilling cycle,
Counter
boring c.
G83 Intermittent _ Rapid traverse Peck drill. cycle
feed
G84 Feed Spindle CCW Feed Tapping cycle
___________________________________________________________________
G85 Feed _ Feed Boring cycle
G86 Feed Spindle stop Rapid traverse Boring cycle
G87 Feed Spindle stop Manual/Rapid Boring cycle,
traverse Back boring
cycl
G88 Feed Dwell > spindle Manual/Rapid Boring cycle
Stop traverse
G89 Feed Dwell Feed Boring cycle

97
It extends to the several blocks, but by using canned cycles it is enabled by
command of one block. It explains what elements a canned cycle consists of.

Movement details:
With canned cycle, movement of 1~6 can be executed as one cycle.
1. Positioning to the hole position
2. Rapid traverse to R point
3. Hole-machining to Z point
4. Operation at hole bottom
5. Return up to R point
6. Rapid traverse up to the initial point
After finishing step 6. cycle goes back to step 1.

Canned cycle mode:


Canned cycle operation can be specified by 3 modes:
1. Data type G90 Absolute command
G91 Incremental command
2. Return level G98 Initial level return
G99 R point return
3. Hold-
machining mode G73 See the list
G74
G76
G80
G81
-
-
G89

98
Data type:

Return level (Initial level and R point level):

G98 G99 Explained on drawing above.

99
Canned cycle (G73, G74)
Detail of movement:(see next drawings)

G73 – This cycle performs high-speed peck drilling. It performs intermittent


cutting feed to the bottom of a hole while removing chips from the hole.

G74 – this cycle performs left-handed tapping cycle, when the bottom of the hole is
reached, the spindle rotates clockwise for retraction.
M3 S2000
G90 G99 G73 X300. Y-250. Z-150. R-100.Q15. F120
Y-550.
Y-750.
X1000.
Y-550.
G98 Y-750.
G80 G28 X0 Y0 Z0
M5

100
Example 1 - Use of a canned cycle as a modal motion code

If a canned cycle is not turned off with


G80 or another motion word, the canned
cycle will attempt to repeat itself using
the next block of code that contains an
X, Y, or Z word. The following file drills
(G81) a set of eight holes as shown.
(note the z position change after the
first four holes.)

n100 g90 g0 x0 y0 z0 (coordinate


home)
n110 g1 x0 g4 p0.1
n120 g81 x1 y0 z0 r1 (canned drill
cycle)
n130 x2

101
n140 x3
n150 x4
n160 y1 z0.5
n170 x3
n180 x2
n190 x1
n200 g80 (turn off canned cycle)
n210 g0 x0 (rapid home moves)
n220 y0
n220 z0
n220 m2 (program end)
The use of G80 in line n200 is optional because the G0 on the next line will turn
off the G81 cycle. But using the G80. as example 1 shows, will provide for an
easily readable canned cycle. Without it, it is not so obvious that all of the blocks
between n120 and n200 belong to the canned cycle.

If you use G80 and do not set another modal motion code soon after, you may
get one of the following error messages.

Cannot use axis commands with G80


Coordinate setting given with G80
These should serve as a reminder that you need to write in a new motion word.

G81 Cycle

The G81 cycle is intended for drilling.

0. Preliminary motion, as described


above.
1. Move the Z-axis only at the current
feed rate to the Z position.
2. Retract the Z-axis at traverse rate to
clear Z.
This cycle was used in the description of
G80 above but is explained in detail
here.

Example 2 - Absolute Position G81

Suppose the current position is (1, 2, 3) and the following line of NC code is
interpreted.

G90 G81 G98 X4 Y5 Z1.5 R2.8


This calls for absolute distance mode (G90) and OLD_Z retract mode (G98) and
calls for the G81 drilling cycle to be performed once. The X value and X position
are 4. The Y value and Y position are 5. The Z value and Z position are 1.5. The R
value and clear Z are 2.8. OLD_Z is 3.

The following moves take place.

1. a traverse parallel to the XY plane to (4,5,3)


2. a traverse parallel to the Z-axis to (4,5,2.8).

102
3. a feed parallel to the Z-axis to (4,5,1.5)
4. a traverse parallel to the Z-axis to (4,5,3)
Example 3
- Relative
Position
G81

Suppose the current position is (1, 2, 3) and the following line of NC code is
interpreted.

G91 G81 G98 X4 Y5 Z-0.6 R1.8 L3


This calls for incremental distance mode (G91) and OLD_Z retract mode (G98). It
also calls for the G81 drilling cycle to be repeated three times. The X value is 4,
the Y value is 5, the Z value is -0.6 and the R value is 1.8. The initial X position is
5 (=1+4), the initial Y position is 7 (=2+5), the clear Z position is 4.8 (=1.8+3),
and the Z position is 4.2 (=4.8-0.6). OLD_Z is 3.

The first preliminary move is a traverse along the Z axis to (1,2,4.8), since
OLD_Z < clear Z.

The first repeat consists of 3 moves.

1. a traverse parallel to the XY-plane to (5,7,4.8)


2. a feed parallel to the Z-axis to (5,7, 4.2)
3. a traverse parallel to the Z-axis to (5,7,4.8)
The second repeat consists of 3 moves. The X position is reset to 9 (=5+4) and
the Y position to 12 (=7+5).
1. a traverse parallel to the XY-plane to (9,12,4.8)
2. a feed parallel to the Z-axis to (9,12, 4.2)
3. a traverse parallel to the Z-axis to (9,12,4.8)
The third repeat consists of 3 moves. The X position is reset to 13 (=9+4) and
the Y position to 17 (=12+5).

103
1. a traverse parallel to the XY-plane to (13,17,4.8)
2. a feed parallel to the Z-axis to (13,17, 4.2)
3. a traverse parallel to the Z-axis to (13,17,4.8)
Example 4 - Absolute G81 R > Z

Now suppose that you execute the first g81 block of code but from (0, 0, 0)
rather than from (1, 2, 3).

G90 G81 G98 X4 Y5 Z1.5 R2.8


Since OLD_Z is below the R value, it adds nothing for the motion but since the
initial value of Z is less than the value specified in R, there will be an initial Z
move during the preliminary moves.

Example 5 - Relative position R > Z

This is a plot of the path of motion for the second


g81 block of code.

G91 G81 G98 X4 Y5 Z-0.6 R1.8 L3


Since this plot starts with (0, 0, 0), the interpreter
adds the initial Z 0 and R 1.8 and rapids to that
location. After that initial z move, the repeat feature works the same as it did in
example 3 with the final z depth being 0.6 below the R value.

G82 Cycle

The G82 cycle is intended for drilling.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate to the Z position.
2. Dwell for the given number of seconds.
3. Retract the Z-axis at traverse rate to clear Z.
The motion of a G82 canned cycle looks just like g81 with the addition of a dwell
at the bottom of the Z move. The length of the dwell is specified by a p# word in
the g82 block.
G90 G82 G98 X4 Y5 Z1.5 R2.8 P2

104
Would be equivalent to example 2 above with a dwell added at the bottom of the
hole.

G83 Cycle

The G83 cycle is intended for deep drilling or milling with chip breaking. The dwell
in this cycle causes any long stringers (which are common when drilling in
aluminium) to be cut off. This cycle takes a Q value which represents a "delta"
increment along the Z-axis. Machinists often refer to this as peck drilling.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate downward by delta or to the Z
position, whichever is less deep.
2. Dwell for 0.25 second.
3. Retract at traverse rate to clear Z
4. Repeat steps 1 - 3 until the Z position is reached.
5. Retract the Z-axis at traverse rate to clear Z.

G84 Cycle

The G84 cycle is intended for right-hand tapping.

0. Preliminary motion, as described above.


1. Start speed-feed synchronization.
2. Move the Z-axis only at the current feed rate to the Z position.
3. Stop the spindle.
4. Start the spindle counterclockwise (CCW).
5. Retract the Z-axis at the current feed rate to clear Z.
6. If speed-feed synch was not on before the cycle started, stop it.
7. Stop the spindle.
8. Start the spindle clockwise.

G85 Cycle

The G85 cycle is intended for boring or reaming.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate to the Z position.
2. Retract the Z-axis at the current feed rate to clear Z.
This motion is very similar to G81 except that the tool is retracted from the hole
at feedrate rather than rapid.

G86 Cycle

The G86 cycle is intended for boring.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate to the Z position.
2. Dwell for the given number of seconds.
3. Stop the spindle turning.

105
4. Retract the Z-axis at traverse rate to clear Z.
5. Restart the spindle in the direction it was going.
This cycle is very similar to G82 except that it stops the spindle before it retracts
the tool and restarts the spindle when it reaches the clearance value R.

G87 Cycle

The G87 cycle is intended for back boring.

The situation is that you have a through hole and you want to counter bore the
bottom of hole. To do this you put an L-shaped tool in the spindle with a cutting
surface on the UPPER side of its base. You stick it carefully through the hole when

It is not spinning and is oriented so it fits through the hole, then you move it so
the stem of the L is on the axis of the hole, start the spindle, and feed the tool
upward to make the counter bore. Then you stop the tool, get it out of the hole,
and restart it.

This cycle uses I and J values to indicate the position for inserting and removing
the tool. I and J will always be increments from the X position and the Y position,
regardless of the distance mode setting. This cycle also uses a K value to specify
the position along the Z-axis of the top of counterbore. The K value is an absolute
Z-value in absolute distance mode, and an increment (from the Z position) in
incremental distance mode.

0. Preliminary motion, as described above.


1. Move at traverse rate parallel to the XY-plane to the point indicated by I and J.
2. Stop the spindle in a specific orientation.
3. Move the Z-axis only at traverse rate downward to the Z position.
4. Move at traverse rate parallel to the XY-plane to the X,Y location.
5. Start the spindle in the direction it was going before.
6. Move the Z-axis only at the given feed rate upward to the position indicated by
K.
7. Move the Z-axis only at the given feed rate back down to the Z position.
8. Stop the spindle in the same orientation as before.
9. Move at traverse rate parallel to the XY-plane to the point indicated by I and J.
10. Move the Z-axis only at traverse rate to the clear Z.
11. Move at traverse rate parallel to the XY-plane to the specified X,Y location.
12. Restart the spindle in the direction it was going before.

106
Example 6 - Backbore

Example six uses a incremental distances from (0, 0, 0) so the preliminary moves
look much like those in example five but they are done using the G87 backbore
canned cycle.

G91 G87 M3 S1000 X1 Y1 Z-0.4 R1.4 I-0.1 J-0.1 K-0.1


You will notice that the preliminary moves shift the tool to directly above the
center axis of the existing bore.

Next it increments that location by the I and J values. I offsets X with a plus
value being added to the current X. J does the same for the Y axis.

For our example block both I and J are negative so they move back from the hole
axis along the path just made by the tool. The amount of offset required should
be just enough that the tool tip will slide down through the bore.

Next the canned cycle moves the tool down in z and at the bottom location
represented in the block by the Z 0.4 value it moves the tool back to the center
of the bore.

Now the G87 canned cycle turns the spindle on and moves back up into the bore
at the programmed feedrate. This is the real cutting action of this canned cycle.
With the proper tool in a boring bar this cycle will produce a chamfer on the
bottom side of the bore. G87 can also be used to produce a larger diameter bore
on the bottom side of the bore.

107
When the tool has reached the K position it is returned to the bottom location,
the spindle is stopped and oriented and follows the earlier path back out of the
bore to the initial position above.

This canned cycle assumes spindle orientation which has not been implemented
in the EMC to date. The proper alignment of the tool tip to the oriented spindle is
critical to the successful insertion of the tool through the hole to be backbored.

G88 Cycle

The G88 cycle is intended for boring. This cycle uses a P value, where P specifies
the number of seconds to dwell.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate to the Z position.

2. Dwell for the given number of seconds.


3. Stop the spindle turning.
4. Stop the program so the operator can retract the spindle manually.
5. Restart the spindle in the direction it was going.
It is unclear how the operator is to manually move the tool because a change to
manual mode resets the program to the top. We will attempt to clarify that step
in this procedure.

G89 Cycle

The G89 cycle is intended for boring. This cycle uses a P value, where P specifies
the number of seconds to dwell.

0. Preliminary motion, as described above.


1. Move the Z-axis only at the current feed rate to the Z position.

108
2. Dwell for the given number of seconds.
3. Retract the Z-axis at the current feed rate to clear Z.
This cycle is like G82 except that the tool is drawn back at feedrate rather than
rapid.

G98 - initial level return in canned cycles


G99 - R value return in canned cycles

These codes are treated together because they behave very much alike. You will
recall that when Z is above R the preparatory move is from the current location to
the X, Y values. If G98 is not specified, then the canned cycle will return to the R
value rather than the Z value that was used on the approach.

N01 G0 X1 Y2 Z3
N02 G90 G81 X4 Y5 Z-0.6 R1.8
Adding G98 to the second line above means that the return move will be to the
value of OLD_Z since it is higher that the R value specified.

Neither code will have any affect when incremental moves with a positive R value
are specified because the R value is added to OLD_Z and that result is used as
the initial level for a G98. The same value is the computed R value so G99 will
also return to the same place.

When the value of R is less than OLD_Z and incremental distance mode is turned
on, G98 will return the tool to the value of OLD_Z. Under those conditions G99
will retract the tool to OLD_Z plus the negative R value. The return will be below
OLD_Z.

Why use a canned cycle?

There are at least two reasons for using canned cycles. The first is the economy
of code. A single bore would take several lines of code to execute.

109
Example 1 above demonstrated how a canned cycle could be used to produce 8
holes with ten lines of nc code within the canned cycle mode. The program below
will produce the same set of 8 holes using five lines for the canned cycle. It does
not follow exactly the same path nor does it drill in the same order as the earlier
example. But the program writing economy of a good canned cycle should be
obvious.

Example 7 - Eight Holes Revisited

N100 G90 G0 x0 y0 z0 (move coordinate home)


N110 G1 F10 x0 G4 P0.1
N120 G91 G81 x1 y0 z-1 R1 L4(canned drill cycle)
N130 G90 G0 x0 y1
N140 z0
N150 G91 G81 x1 y0 z-.5 R1 L4(canned drill cycle)
N160 G80 (turn off canned cycle)
N170 M2 (program end)
Example 8 - Twelve holes in a square

This example demonstrates the use of the L word to repeat a set of incremental
drill cycles for successive blocks of code within the same G81 motion mode. Here
we produce 12 holes using five lines of code in the canned motion mode.

N1000 G90 G0 x0 y0 z0 (move coordinate home)


N1010 G1 F50 x0 G4 P0.1
N1020 G91 G81 x1 y0 z-.5 R1 L4(canned drill cycle)
N1030 x0 y1 R0 L3 (repeat)
N1040 x-1 y0 L3 (repeat)
N1050 x0 y-1 L2 (repeat)
N1060 G80 (turn off canned cycle)
N1070 G90 G0 x0 (rapid home moves)
N1080 y0
N1090 z0
N1100 M2 (program end)
The second reason to use a canned cycle is that they all produce preliminary
moves and returns that you can anticipate and control regardless of the start
point of the canned cycle.

Description, details of movement:

G73 - peck drilling cycle. G73 X1. Y1. Z-1. R.1 Q.1 F10 G99

The extra word you need for this canned cycle is Q. The Q word sets the length of each peck. In
the above example the peck distance is set to .100. After each peck the Z axis backs off .005
momentarily to break the chip. The amount of the retraction to break the chip can be adjusted
by changing a controller parameter. Usually .005 is acceptable. As in all pecking cycles the
programmer does not need to calculate the number of pecks and peck distance that will equal
the Z Depth. The controller will calculate the distance of the last peck to coincide with the Z
depth.

Note: for many machines there is an optional K word which - after an accumulation of K depth -
will rapid the drill to the R plane to clear accumulated chips. If K.3 was inserted in the above
line of code the drill would make three .1 pecks then rapids to R to clear the accumulation and
then rapids back to about .005 short of the last depth to continue with the pecking.

110
G74 - left hand tapping cycle: G74 X1. Y1. Z-.3 R.4 F100

This cycle is for a left hand tap to machine left hand threads. The spindle must be running in
reverse (M4). When the tap is at its' programmed depth then the spindle reverses and the tap
will feed back out of the hole.

This cycle requires a tension/compression tap holder. This type of tool holder allows the tap to
"float" up and down the spindle centerline a short distance (usually about .400). The need for
this type of tool holder is based on the fact that, with many machines, you can not program a
feed rate that is perfectly equivalent to the pitch of a thread. This is because the spindle can
not be programmed to turn in relation to the Z axis feed (an exception is rigid tapping
mentioned a few pages later).

The example given will tap a 1/4 -20 thread .300" inch deep: G74 X1. Y1. Z-.3 R.4 F100

Tapping cycles are more complex to program and have special rules to follow. The above
example requires the rapid plane to be at a .400" minimum so that the tap fully retracts prior
to movement to the next position.

The feed rate of 100 is calculated with the spindle speed in mind. For a 1/4 -20 tap at
2000RPM,

Feed rate= 1/threads per inch * RPM, = 1/20 * 2000, or .05 *2000, = 100.

It is extremely important to make sure the RPM is programmed to reflect the RPM used in the
calculation. Remember! this is an approximation which requires much experience to program
safely.

G76 - fine boring cycle: G76 X1. Y1. Z-1.R.1 I-.002 F5 G98

This cycle leaves no witness mark in the hole by moving the tool away from the bored surface
before retracting. The tool feeds down to the bottom of the bore and the spindle stops and
orients itself (to the M19 position). Next, the tool retracts from the wall of the bore and rapids
out of the hole.

G76 X1. Y1. Z-1.R.1 I-.002 F5 G98

New words are I and J. Depending on how the tool orients itself will determine which new word
to use to move the tool away from the bored surface.

Note that I and J are simply clones of X and Y.

In other words I-.002 tells the controller to move the tool .002 in the -X direction. J.002 tells
the controller to move the tool .002 in the +Y direction.

G81 - standard drilling cycle : G81 X1. Y1. Z-.2 R.1 F3 G99

This cycle can be used for center drilling, drilling, reaming, and rough boring. The cycle travels
down at the set feed rate and then rapids out of the hole.

G81 X1. Y1. Z-.2 R.1 F3 G99

Notice that the depth is somewhat shallow. For drilling deeper holes, another cycle is

111
recommended, like the G73 or G83. Chips can clog in the flutes and break or overheat a drill.

G82 - counter boring cycle: G82 X1. Y1. Z-1. R.1 P500 F7 G98

This cycle causes the tool to feed to the bottom, pause if desired, and then rapid out of the
hole.

G82 X1. Y1. Z-1. R.1 P500 F7 G98

Note the new word. P=Pause (or dwell) and is programmed in milliseconds. A millisecond is
1/1000 of a second so 500/1000 is 1/2 second of pause. It is important to allow the tool time
to cut the bottom of the hole.

A pause relieves tool pressure. For counter bore depths that have tight tolerance, this time is
necessary.

If you don't want to pause just use a G81

G83 - deep hole drilling cycle: G83 X1. Y1. Z1. R.1 Q.1 F6 G99

This cycle is used for deeper holes where it is required to clear chips and curls from the hole.
Too many chips in a deep hole can cause breakage. This cycle drills at the set feed rate then
retracts at rapid speed back to the rapid plane to clear out chips. It then it rapids back into the
hole, just short of the last depth, and begins another feed. After getting to the specified Z
depth, it retracts at rapid speed.

G83 X1. Y1. Z1. R.1 Q.1 F6 G99

A rule of thumb about drill depths. If the drill depth is more than 3 times the diameter of the
drill, then a G83 should be used. Like G73, the "Q" word is necessary to set the amount of
drilling per peck.

A parameter in the controller will control the distance between the end of the rapid plunge and
the new material to be drilled after each completed peck.

G84 - right hand tapping cycle: G84 X1. Y1. Z-.3 R.4 F100

This cycle is for a right hand tap to machine right hand threads. The spindle must be running in
forward (M3). When the tap is at its' programmed depth then the spindle reverses and the tap
will feed back out of the hole.

This cycle requires a tension/compression tap holder. This type of tool holder allows the tap to
"float" up and down the spindle centerline a short distance (usually about .400).

The need for this type of tool holder is based on the fact that, with many machines, you can not
program a feed rate that is perfectly equivalent to the pitch of a thread. This is because the
spindle can not be programmed to turn in relation to the Z axis feed (an exception is rigid
tapping mentioned a few pages later).

The example given will tap a 1/4 -20 thread .300" inch deep: G84 X1. Y1. Z-.3 R.4 F100

Tapping cycles are more complex to program and have special rules to follow. The above
example requires the rapid plane to be at a .400" minimum so that the tap fully retracts prior

112
to movement to the next position.

The feed rate of 100 is calculated with the spindle speed in mind. For a 1/4 -20 tap at
2000RPM,

Feed rate= 1/threads per inch * RPM, = 1/20 * 2000, or .05 *2000, = 100.

It is extremely important to make sure the RPM is programmed to reflect the RPM used in the
calculation. Remember! this is an approximation which requires much experience to program
safely.

G85 - reaming cycle: G85 X1. Y1. Z1. R.1 F5 G99

This cycle is used when reaming and feeds in and out at the set feed rate.

G85 X1. Y1. Z1. R.1 F5 G99

Many programmers will use G81 or G86 to ream and not waste time feeding back out of the
hole. However rapid extraction of a reamer from a hole can produce unwanted scoring.

G86 - boring cycle: G86 X1. Y1. Z-1. R.1 F7 G98

This cycle feeds the tool in and at the bottom it stops the spindle. The spindle then orients and
rapids out.

G86 X1. Y1. Z-1. R.1 F7 G98

If you are using a boring tool with this cycle it will probably scrape the side of the bore wall
when it exits the hole.

Many programmers use this cycle for reaming because it will produce a tighter hole. A G85
reaming cycle may cut on the way out of the hole and make it bigger, .0001"-.0003" or more
depending on the material.

G89 - counter boring cycle for a boring bar: G89 X1. Y1. Z-1. R.1 P800 F10

This cycle is half G82 and half G86 canned cycle. The tool will feed into the hole and pause at
the bottom. Then the spindle will stop and the tool will rapid out.

G89 X1. Y1. Z-1. R.1 P800 F10

This cycle will leave a witness mark. Again, the pause is necessary for very accurate depths to
relieve tool pressure.

Rigid Tapping

It should be noted that different manufacturers of CNC controllers have different rules for
tapping. It is a good idea to review the machine center's programming manual.

There are different ways to tap. One way is to use a compression tap holder, an expensive
accessory device already mentioned..

A more accurate, efficient, and convenient way to tap is rigid tapping. Rigid tapping is an
optional control feature available on many CNC machining centers. Rigid tapping controls the

113
speed of the spindle in exact proportion to the Z feed.

There are different formats for compression tapping and rigid tapping. Many manufacturers
have slightly modified G codes to enable their use properly.

Metric threads require the use of a Q word and a different formulation for the feed rate. Again,
it is a good idea to read at the machine centers' programming manual to be sure.

Mill Canned cycles - Complex deep hole drilling

Drilling canned Cycle Drilling canned Cycle with dwell Simple deep hole drilling Tapping canned cycle
Reaming canned cycle Boring cycle with withdrawal in rapid Rectangular pocket canned cycle Circular
pocket canned cycle Boring cycle with withdrawal at feedrate
G69 G98/G99 X Y Z I B C D H J K L R G81 G98/G99 X Y Z I K
G82 G98/G99 X Y Z I K G83 G98/G99 X Y Z I J G84 G98/G99 X
Y Z I K R G85 G98/G99 X Y Z I K G86 G98/G99 X Y Z I K G87
G98/G99 X Y Z I J K B C D H L V G88 G98/G99 X Y Z I J B C D H
L V G89 G98/G99 X Y Z I K

G8? or G69 G98/G99 X Y Z I K have the standard meaning for all the cycles.
I= total depth ***exception G83, I = drilling step K= dwell time *** exception G87 K= distance from
center to edge of pocket

Lets go over the other parameters for each cycle:


B: G69,G87,G88---- drilling step in axis longitudinal to the main plane
C: G69---------------- distance from the previous drilling step G87, G88----
----- milling pass along the main plane
D: G69,G87, G88--- distance between the reference and surface of the part
H: G69 --------------- distance the axis will withdraw after each drilling step
G87,G88---------the feedrate for the finishing pass
J: G69---------------- how many drilling steps the tool withdraws to reference plane G83 --------------- number of
steps which the drill is to make G87 --------------- distance from center to the edge of the pocket G88----------
------radius of the pocket
L: G69---------------- minimum value which the drilling step can acquire G87, G88 ---
----- finishing pass along the main plane
R: G69 --------------- factor which reduces the drilling step ―B‖ G84 -----------
---- defines the type of tapping: normal or rigid

V: G87,G88-----------defines tool penetrating federate

Canned Cycle Area of influence:


Once a canned cycle has been defined it remains active until cancelled. In other words every time a block has some
axis movement programmed, the machining operation of the canned cycle is active also. If you program N at the end
of the block, the CNC repeats the programmed move and the machining operation.

G98:withdrawal of tool as far as the initial plane


G99:withdrawal of tool as far as the reference plane
G80: cancels the canned cycle
G79: allows modifications of parameters within the canned cycle. programmed alone in a block
General Considerations:
a) a canned cycle can be defined at any point in a program. b) calls to subroutines can be made while the canned cycle
is active c) execution of a canned cycle will not alter the history of previous G functions d) a canned cycle can be
entered with M3 or M4. if no direction is entered, CNC assumes M3 e) execution of a canned cycle cancels radius
compensation. equivalent to G40 f) tool length compensation must be programmed in the before the canned cycle or
same block.

114
MULTIPLE MACHINING

Multiple machining in a straight line pattern G60 A (XI)or(XK)or(IK) P Q R S T U V


Multiple machining in a rectangular pattern G61 A B (XIor XK or IK ) (YJ orYD or
JD) P Q R S T U V
Multiple machining in a grid pattern G62 A B (XIorXK or IK) ( YJorYD orJD)
PQRSTUV
Multiple machining in a circular pattern G63 X Y (I or K) C F P Q R S T U V
Multiple machining in a arc pattern G64 X Y B (I or K) C F P Q R S T U V
Multiple machining by means of an arc chord G65 X Y (A or I) C F
A:------------------defines the angle which forms the machining pass with the
abscissa axis
B:------- G61----- defines the angle formed by two machining paths.
G64 ---- defines the angular stroke of the machining path
C:------- indicates how the movement is made between machining points 0=G0,1=G1,2=G2,
3=G3
D:---------------------------- number of operations in the ordinate axis
F:---------------------------- feedrate used between points
I:-------- G60,G61,G62 -- pitch between machining operations
G63,G64--------- pitch angle between machining operations
G65--------------- defines the chord length
J:-------- pitch between machining operations according to the ordinate axis
K:------- number of total machining operations
PQRSTUV:----------------- points where it is not required to machine
X:------- G61,G62 -------- length of the machining path
G63,G64,G65 -- distance from the starting point to center along the abscissa axis
Y:------- G61,G62--------- pitch between machining operations according to the ordinate axis
G63,G64,G65---distance from the starting point to center along the ordinate axis

General considerations:

Multiple functions are defined as a series of functions which allow a machining operation to be
repeated along a given path.
The programmer will select the type of machining which can be a canned cycle or a modal
subroutine.
These functions must be defined every time they are used. These functions will only make
sense if they are under the influence of a canned cycle or modal subroutine
The following operations will be done under the same working conditions defined by the canned
cycle
To perform multiple machining, follow these steps:
1) move the tool to the first point of the multiple machining operation
2) define the canned cycle or modal subroutine to be repeated at all the points
3) defined the multiple operation to be performed

Canned cycle (G76, G80, G81)


Fine boring cycle
Detail of movement:
The fine boring cycle bores a hole precisely. When the bottom of the hole has been reached,
the spindle stops.and tool is moved away from the machined surfice of the workpiece and
retracted.

115
Oriented spindle stop

Q (Shift at the bottom of the hole ) is a modal value retained within canned cycles. It must be
specified carefully because it is also used as the depth of cut for G73 and G83.
When the bottom of the hole has been reached, the spindle stoped at the fixed rotation
position, and the tool is moved in the direction opposite to the tool tip and retracted. This
ensures that the machined surface is not damaged and enables precise and efficient boring to
be performed.
Before specifying G76, use a miscellaneous function (M code) to rotate the spindle.
When the G76 command and a M code are specified in the same block, the M code is executed
at the time of the first positioning operation. The system then proceeds to the next operation.
When K is used to specify the number of repeats, the M code is executed for the first hole only;
For the second and subsequent holes, the M code is not executed. When a tool length offset
(G43, G44, or G49) is specified in the canned cycle, the offset is applied at the time of
positioning to point R.
Example:
M3 S500 Cause the spindle start rotating
G90 G99 G76 X300. Y-250. Position, bore hole1, then return to point R
Z-150. R-120. Q5. Orient at the bottom of the hole, then shift by 5mm
P1000 F120 Stop at the bottom of the hole for 1 sec.
Y-550. Position, drill hole 2, then return to point R

116
Y-750. Position, drill hole 3, then return to point R
X1000. Position, drill hole 4, then return to point R
Y-550. Position, drill hole 5, then return to point R
G98 Y-750. Position, drill hole 6, then return to initial level
G80 G28 G91 X0 Y0 Z0 Return to the reference position
M5 Spindle stops

Canned cycle G81


Drilling cycle, spot drilling

This cycle is used for normal drilling. Cutting feed is performed to the bottom of the hole in
rapid traverse.

After positioning along the X- and Y- axes, rapid traverse is performed to point R. Drilling is
performed from point R to point Z.
The tool is then retracted in rapid traverse.

Canned cycle G82


Drilling cycle Counter boring cycle

This cycle is used for normal drilling. Cutting feed is performed to the bottom of the hole, At the
bottom, a dwell is performed, then the tool is retracted in rapid traverse. This cycle is used to
drill holes more accurately with respect to depth.
After positioning along the X- and Y- axes, rapid traverse is performed to point R. Drilling is
then performed from point R to point Z.
When the bottom of the hole has been reached, a dwell is performed.
The tool is then retracted in rapid traverse.

117
Peck drilling cycle G83
This cycle performs peck drilling. It performs intermittent cutting feed to the bottom of a hole
while removing shavings from the hole.

118
Q represents the depth of cut for each cutting feed. It must always be specified as an
incremental value.
In the second and subsequent cutting feeds, rapid traverse is performed up to a point just
before where the last drilling ended, and cutting feed is performed again.
EXAMPLE:
M3 S2000
G90 G99 G83 X300. Y-250. Z-150. R-100. Q15. F120
Y-550.
Y-750.
X1000.
Y-550.
G98 Y-750.
G80 G28 G91 X0 Y0 Z0
M5

Tapping cycle G84


This cycle performs tapping. In this tapping cycle, when the bottom of the hole has been
reached, the spindle is rotated in the reverse direction.

Tapping is performed by rotating the spindle clockwise. When the bottom


of the hole has been reached, the spindle is rotated in the reverse direction for retraction. This
operation creates threads.
Feedrate overrides are ignored during tapping. A feed hold does not stop the machine until the
return operation is completed.
EXAMPLE:
M3 S10
G90 G99 G84 X300. Y-250. Z-150. R-120. P300 F120
Y-550.
Y-750.
X1000.
Y-550.
G98 Y-750.

119
G80 G28 G91 X0 Y0 Z0
M05

Program example using tool length offset and canned cycles

The programming is shown on next page:

120
The only difference between G88 and G89 is dwell on bottom of the hole in G89 cycle.
G80 Cancels canned cycles
Rigid Tapping G84

Rigid Tapping (When the spindle motor is controlled in rigid mode as if were a servo motor, a
tapping cycle can be speed up).
Rigid mode can be specified using any of following methods:
a) …M29 S… before a tapping command
b) …M29 S… in a block which contains a tapping command
c) …G84… for rigid tapping
Thread lead:
a) In feed per min….feedrate x spindle speed
b) In feed per revolution mode…thread lead equals federate speed
In the canned cycle tool offsets are ignored.

G94 (PER MINUTE)


G00 X120.Y100.
M29 S1000
G84 Z-100. R-20. F1000
G95 (PER REVOLUTION)
G00 X120. Y100.
M29 S1000
G84 Z-100. R-20. F1.0

121
Left-handed rigid tapping cycle G74

The only difference is spindle direction is CCW

Peck rigid tapping cycle G84 or G74


Tapping a deep hole in rigid tapping mode may be difficult due to chips building around tool and
increasing cutting resistance and usually breaking tool.
In pecking cycle, cutting is performed several times, until the bottom of the hole is reached.

Plunge grinding cycle

A plunge grinding cycle is performed.

122
The plunge grinding cycle consists of six operation sequences. Operations
1 to 6 are repeated until the depth reaches the total depth of cut specified
at address K. In the single block stop mode, operations 1 to 6 are
performed every cycle start.

Cutting is performed along the axis 1 to 6 are repeated until the depth
reaches the total depth of cut specified at address K. In the single block
stop mode, operations 1 to 6 are performed every cycle start.
Cutting is performed along the axis Y in cutting feed mode for the amount
specified by I (depth of cut1). The federate is specified by R.
Dwell is performed for the time specified by P.

Programming samples

123
More programming samples on next page:

124
125
Grinding wheel cutting: Cutting is performed
along Y axis in cutting feed mode for amount
specified by I (depth of cut). The federate is
specified by R.
Continuous- feed surface grinding cycle
G78
X, (Z), I, J and K must all be specified in
incremental mode.

126
Intermittent- feed surface grinding cycle G79
X, (Z), I, J and K must all be specified in incremental mode.

CONSTANT SURFACE SPEED CONTROL (G96, G97)


The constant surface speed control is provided to calculate the spindle speed so the surface
speed is kept as specified with a tool position change. It then supplies a voltage, corresponding
to the calculated spindle speed, to the spindle control to rotate the spindle at the correct
surface speed when the surface speed (relative speed between the tool and a workpiece) is
specified after S. The surface speed unit is as shown bellow:
INPUT UNIT Surface speed unit
MILLIMETER m/min
INCH feet/min

This surface speed unit may change according to machine tool builders.

SPECIFICATION METHOD – FORMAT

For the constant surface speed control, specify the following G codes.
Command constant surface speed as follows:
G96 PÞ S……; S- Surface speed (m/min or feet/min)
P0 Axis set in the parameter(No. 041#4, #5)
P1 X axis, P2; Y axis, P3; Z axis, P4; 4th axis
Note: This surface speed may change according to machine tool builder‘s specification. If a
surface speed is omitted, the S value specified in the previous G96 is used.

Cancel constant surface speed as follows:


G97 S…….; Spindle speed (rpm)

To execute the constant surface speed control, it is necessary to set the work coordinate
system so the coordinate value at the center of the rotary axis, for instance, Z axis (Axis to
which the constant surface speed control applies) becomes Zero.

127
G96 (constant surface speed control command) is a modal G code. After a G96 command is
specified, the program enters the constant surface speed control mode (g96 mode) and
specified S values are assumed as a surface speed.

A G96 command must specify the axis along which constant surface speed control is applied. If
address P is omitted, P0 is assumed. G97 command cancels the G96 mode. If an S value is
omitted in a G97 block, the last speed specified in the G96 mode remains valid.

When constant surface speed control is applied, a spindle speed higher then the value specified
in G92S… (max spindle speed) is clamped at the max spindle speed. When the power is turned
on, the max spindle speed is not yet set and the speed is not clamped.

S(surface speed) commands in the G96 mode are assumed as S=0 (the surface speed is 0)
until M03 (rotating the spindle in the positive direction) or M04 (rotating the spindle in the
negative direction) appears in the program.

128
CONSTANT SURFACE SPEED CONTROL FOR THREADING
The constant surface speed control is also effective during threading. Accordingly, it is
recommended that the constant surface speed control be invalidated with G97 command before
starting to scroll threading and tapper threading , because the response problem in the servo
system may not be considered when the spindle speed changes.

CONSTANT SURFACE SPEED CONTROLFOR RAPID TRAVERSE


In a rapid traverse block specified by G00, the constant surface speed control is not made by
calculating the surface speed to a transient change of the tool position, but is made by
calculating the surface speed based on the position at the end point of the rapid traverse block,
on the condition that cutting is not executed at rapid traverse.

129
Clearance levels

Qualifying Probe Tips Probe Compensation

CMMs generally gather their data by touching the workpiece with a probe (either a solid probe
or an electronic touch trigger probe) attached the machine's measuring axis. Although the tip
of the probe is very accurate, once the probe is attached to the CMM, the location of the tip to
the machine's coordinate system must be determined prior to measuring. Since it's the tip's
circumference that touches the part, the probe's center and radius are determined by
measuring a very accurate sphere (requalification sphere).

Once the center and radius of the tip are known, when the probe contacts a workpiece, the
coordinates of the tip are mathematically "offset" by the tip's radius to the tip's actual point of
contact (Figure 14). The direction of the offset is automatically determined by the alignment
procedure.

We do a similar procedure when we park a car. The better we can estimate our offset from the
exterior of the car, the closer we can park it to the curb.

Using Effective Probe Techniques

You can reduce the likelihood of shanking by using a larger diameter tip to increase the
clearance between the ball/stem and the workpiece surface. Generally, the larger the tip
diameter, the deeper the stylus can go before it touches the workpiece feature. This is called

130
the effective working length of the probe (Figure 21). Also, the larger the tip, the less effect it
has on the surface finish of the workpiece since the contact point is spread over a larger area of
feature being measured. However, the largest tip that can be used is limited by the size of the
smallest holes to be measured.

Measurement points taken with an electronic probe are recorded when the stylus is deflected
enough to either break mechanical contacts or generate enough force to trigger pressure-
sensitive circuitry. The physical arrangement of the contacts causes slight errors in accuracy,
although these are reduced during probe qualification. However, the longer the probe tip
extension, the larger the pre-travel error and the more residual error is left after probe
qualification. Longer probes are not as stiff as shorter ones. The more the stylus bends or
deflects, the lower the accuracy. You should avoid using probes with very long stylus/
extension combinations.

Geometric Dimensioning and Tolerancing

Geometric Dimensioning and Tolerancing (GD&T) is a universal language of symbols, much like
the international system of road signs that advise drivers how to navigate the roads. GD&T
symbols allow a Design Engineer to precisely and logically describe part features in a way they
can be accurately manufactured and inspected. GD&T is expressed in the feature control
frame (Figure 22). The feature control frame is like a basic sentence that can be read from left
to right. For example, the feature control frame illustrated would read: The 5 mm square
shape (1) is controlled with an all-around (2) profile tolerance (3) of 0.05 mm (4), in
relationship to primary datum A (5) and secondary datum B (6). The shape and tolerance
determine the limits of production variability.

There are seven shapes, called geometric elements, used to define a part and its features.
The shapes are: point, line, plane, circle, cylinder, cone and sphere. There are also certain
geometric characteristics that determine the condition of parts and the relationship of features.

These geometric symbols are similar to the symbols used on maps to indicate features, such as

131
two and four lane highways, bridges, and airports. They are like the new international road
signs seen more frequently on US highways. The purpose of these symbols is to form a
common language that everyone can understand.

Geometric Characteristic Symbols

Straightness — A condition where all points are in a straight line, the tolerance
specified by a zone formed by two parallel lines.

Flatness — All the points on a surface are in one plane, the tolerance specified by a
zone formed by two parallel planes.

Roundness or Circularity — All the points on a surface are in a circle. The


tolerance is specified by a zone bounded by two concentric circles.

Cylindricity — All the points of a surface of revolution are equidistant from a


common axis. A cylindricity tolerance specifies a tolerance zone bounded by two
concentric cylinders within which the surface must lie.

Profile — A Tolerancing method of controlling irregular surfaces, lines, arcs, or


normal planes. Profiles can be applied to individual line elements or the entire
surface of a part. The profile tolerance specifies a uniform boundary along the true
profile within which the elements of the surface must lie.
Angularity — The condition of a surface or axis at a specified angle (other than 90°)
from a datum plane or axis. The tolerance zone is defined by two parallel planes at
the specified basic angle from a datum plane or axis.

Perpendicularity — The condition of a surface or axis at a right angle to a datum


plane or axis. Perpendicularity tolerance specifies one of the following: a zone
defined by two planes perpendicular to a datum plane or axis, or a zone defined by
two parallel planes perpendicular to the datum axis.
Parallelism — The condition of a surface or axis equidistant at all points from a
datum plane or axis. Parallelism tolerance specifies one of the following: a zone
defined by two planes or lines parallel to a datum plane or axis, or a cylindrical
tolerance zone whose axis is parallel to a datum axis.

Concentricity — The axes of all cross sectional elements of a surface of revolution


are common to the axis of the datum feature. Concentricity tolerance specifies a
cylindrical tolerance zone whose axis coincides with the datum axis.

Position — A positional tolerance defines a zone in which the center axis or center
plane is permitted to vary from true (theoretically exact) position. Basic dimensions
establish the true position from datum features and between interrelated features.
A positional tolerance is the total permissible variation in location of a feature about
its exact location. For cylindrical features such as holes and outside diameters, the
positional tolerance is generally the diameter of the tolerance zone in which the axis
of the feature must lie. For features that are not round, such as slots and tabs, the
positional tolerance is the total width of the tolerance zone in which the center plane
of the feature must lie.

132
Circular Runout — Provides control of circular elements of a surface. The
tolerance is applied independently at any circular measuring position as the part is
rotated 360 degrees. A circular runout tolerance applied to surfaces constructed
around a datum axis controls cumulative variations of circularity and coaxiality.
When applied to surfaces constructed at right angles to the datum axis, it controls
circular elements of a plane surface.

Total Runout — Provides composite control of all surface elements. The tolerance
applied simultaneously to circular and longitudinal elements as the part is rotated
360 degrees. Total runout controls cumulative variation of circularity, cylindricity,
straightness, coaxiality, angularity, taper, and profile when it is applied to surfaces
constructed around a datum axis. When it is applied to surfaces constructed at right
angles to a datum axis, it controls cumulative variations of perpendicularity and
flatness.

133
MACHINE SEQUENCE:

134
After Word

You made it! Congratulations and Welcome to a “New Beginning”.


Assuming that you have read and understood the whole “CNC PROGRAMMING - Secrets
revealed” E book, You are now ready to begin your own CNC journey. As the “NIKE” slogan says
”JUST DO IT”.
Take it one step at a time and soon you’ll have a new path in your life- the path to success.
Whatever you choose to do, I wish you Health, Happiness and great success always!

Ross Vas

Other CNC Courses available:

1. CNC LATHE SETTING & PROGRAMMING


(Beginner to super advanced guide)

2. CNC MILL SETTING & PROGRAMMING


(Beginner to super advanced guide)

3.CNC PROGRAMMING “FANUC” method - Almost everyone in the world of CNC knows, Fanuc is the control of
choice in most shops in the US and the world. Learn their system and you will have the best chance for a good
job.

4.CNC MACRO PROGRAMMING + Macro calculator FREE - Learn the best kept secret of CNC! One of our most
popular courses!!! Certainly many in this industry have never even heard of parametric programming!!!

5. CNC SEAL-Mastering – Sought after skill - Learn how to make premium machined seals!!!
6. Mastercam for beginners
7. Autocad for beginners
8. Ecoca lathe
9. CNC Programming – Heidenhain control ...

Check www.cnc-academy.com for new courses.

Learn the best kept secret of CNC!


MACRO programming
One of our most popular courses!
Certainly many in this industry have never even heard of parametric programming!!!

Free practical help:


If you need help with any programming questions or if you have a problem in producing a CNC
lathe or mill part efficiently, give us a call or send an e-mail and we will help with pleasure!

CNC-ACADEMY®
Sydney NSW Australia
Customer service:
Tel: +61 401 461 791

www.cnc-academy.com
support@cnc-academy.com

Copyright© 2005-2011

135
136

Você também pode gostar