You are on page 1of 82

Typical CNC Machining Centre

Horizontal Axis Milling Vertical Axis Milling

2
Content
Introduction to CNC Machining

Operating a CNC Machine

Program Planning

CAM Mill Programming for CNC Machinist


Introduction to CNC Machining
N10 G90 G92 X-306.00 Y245.00 Z254.00;
N20 G40 G80;
N30 M03 S2500;
N40 G00 X0.0 Y0.0;
N50 G00 Z5.0;
N60 G01 Z-5.0 F100;
N70 G02 ????? R??? F300;
N80 ???????????????????????;
????????????????????????????;
?????????????????;
N?? G00 Z50.0;
N?? G91 G28 Z0.0;
N?? G28 X0.0 Y0.0;
M30
Introduction to CNC Machining
Primary linear axes – X, Y and Z
Introduction to CNC Machining
Primary rotary axes – A, B and C
Introduction to CNC Machining
Secondary Linear – U, V and W
Introduction to CNC Machining
Absolute and incremental values

Next location Absolute positioning command: G90 X6. Y8.

Relative positioning command: G91 X2. Y3.

Current location
Introduction to CNC Machining
Points for geometry and reference
All absolute coordinates refer to a singular starting place which is called origin.
In CNC work it’s called program reference zero (PRZ). This is the origin of the grid.
The first thing during planning is to fined the PRZ relative to the part’s geometry.

PRZ is a floating point


Introduction to CNC Machining
Points for geometry and reference
Geometric Points

Machine home (M/H): It is fixed location with the machine envelope. Not used for
program execution.
Introduction to CNC Machining
Points for geometry and reference

Local Reference Zero (LRZ) point is also used to simplify programming, repeating
same program at different positions and save time.
Introduction to CNC Machining
Axis moves
Rapid travel (rapid): fastest speed the machine can produce to reposition for
another cut or to change tools or parts. The tool must be slowed to feed rate at a
distance from the workpiece. The distance takes account clamps, vise, chuck jaws
and other holding tooling.

Retract Height (R): safe travel height above the work/tooling where the tool must
pull back several times, the move over the work surface as in drilling a series of holes
for example.
Introduction to CNC Machining
Axis moves
Introduction to CNC Machining
Axis moves

G01
G02 - Clockwise
G03 - Counterclockwise
Introduction to CNC Machining
Polar Coordinates
Introduction to CNC Machining
Commonly used codes from last year
• G00 Rapid positioning G01 Linear Interpolation
• G02 Circular Interpolation Clockwise
• G03 Circular Interpolation Anti-clockwise
• G90 Absolute Coordinates. G91 Incremental Coordinates
• M03 Spindle on clockwise
• M30 Program end and reset M04 Spindle on anti-clockwise
• See blackboard (Lab session 1) for full list of codes

N20 G00 X300.0 Y220.0 Z250.0;


N30 M03 S2650;
• Line numbers N20
• Preparatory functions G00
• Miscellaneous functions M03
• Tool position X, Y & Z
Introduction to CNC Machining
• All dimensions must include a point after the coordinate

X20.0 Y120.36 Z205.0;

Table movement from machine reference point.

Machine table ref. Pt 0,0


Introduction to CNC Machining
Typical Program Start
• N10 G40 G49 G90; Safe line
• N20 M06 T10; tool change sequence
• N30 G43 H10; tool length offset
• N40 G92 X-360.0 Y147.0 Z330.0; works reference
• N50 G90 G00 X-30.0 Y65.0 Z-5.0;
• N60 M03 S2000; turn spindle on clockwise
Setting the works reference only needed if part program has to be transferred
to milling machine to make the workpiece.

Typical end of program.


• N130 M05; stop spindle
• N140 G28 X0 Y0 Z0; return to machine ref. pt.
• N150 M30 end program and go to
controller better than using M02
Operating a CNC Machine
CNC document list
Operating a CNC Machine
CNC document list
Ø Program identification code with revision level
Ø Program location – central computer, disk, tape, and so on.
Ø Specific machines for which it was processed
Ø Special jigs/fixtures with ID numbers for this job
Ø Raw material size, alloy, and heat-treat condition.
Ø Standard tooling required along with tool number in the
program
Ø Custom tooling required and their tool number
Ø PRZ location in the setup
Operating a CNC Machine
CNC document list
Ø Specific location and kind of chucking/holding/clamping
tooling
Ø Even sequence
Ø Any special instruction particular to the job:
üClamp change at mid program halt
üWarnings about a large piece of excess material that will
fly off the work at a given point of program.
üThe part must be rotated or repositioned in the chuck at a
certain halt point.
ü A key dimension that must be measured at a given halt
point.
Operating a CNC Machine
Cutter compensated programs
When loading cutters, depending on the kind of program
compensation, cutter selection might be:
Exact size and shape for programs without cutter compensation
(Less likely in a modern shop)
Near to the size and shape listed, if the program is compensated
for tool differences.
You have some freedom to choose tools that aren’t exactly
the same size, as stated in the document.
But to use this capability, you must tell the control what size
the tool you will be using is – stored under tool radius
compensation for mills or nose radius for lathes.
Best practice: choose tools as close as possible to the stated
size.
Operating a CNC Machine
Cutter compensated programs

But the very reason for compensation is to be able to use tools


that are not exactly as programmed.
If using insert tools, this isn’t an issue unless you change their
size or shape.
But when using HSS tools that have been re-sharpened, then
their new size can be used to produce perfect parts if the control
knows what size they are – your job is to enter that adjusting
offset it in tool comp memory.
Operating a CNC Machine
Cutter compensated programs
Here’s the first issue in using tool compensation:
Programs are written as
Cutter Path – a program path that is the intended tool radius
distance (lathe or mill) away from the geometry.
Part Path – a program that has no tool radius built in. The raw
path is the definition of the part geometry.
Operating a CNC Machine
Cutter compensated programs
This profile mill program was
written for a specific size cutter
but that size need not be used.
Without changing the cutter
offset, it traces a line that’s the
center of the listed cutter, as it
moves around the part
geometry, thus its other name,
cutter center-line program.

Using a smaller cutter than that for which the path was written,
the offset must be a minus number equal to the difference in
actual tool radius and intended – a minus compensation to move
the cutter closer to the work by the offset amount.
Operating a CNC Machine
Cutter compensated programs
Here the program traces the shape
of the geometry. It is written with no
cutter values in the program but the
programmer had a size in mind, and
listed it on the setup sheet.
Without a stored radius comp value -
you might think of it as a cutter path, The Cutter Radius
but with a cutter of zero radius. A
pencil in the spindle would trace the is the offset
part profile. A Positive Value

As such all real cutters will require positive offset values equal to
their radius to be entered in tool radius comp. The control then
moves the cutter off the geometry by it’s real radius and makes a
correct part.
Operating a CNC Machine
Cutter compensated programs

In shops where they create their own programs, they do not mix
program types. Either part path or cutter center-line are used
exclusively.
But the big issue arises in a job shop where outside customers
provide jobs with programs. Then the setup person MUST know
which type and enter tool offsets accordingly.
At best, bad parts will be made missing this setup detail, but big
crashes can occur if you get this step wrong.
Operating a CNC Machine
Cutter compensated programs

What offset change amount and value (+/-) will bring each
exactly to size? They are not on the same object; each feature
is an individual problem.
Operating a CNC Machine
Lathe Tool Selection
Lathe cutter selection has another aspect, in that the shank shape
and the direction it is pointing must be considered too.
Otherwise tool interference can occur during program runs.
When choosing lathe tools, the shape and/or the way it is
orientated relative to the machine axes must also be part of the
compensation.
The control will not know how to approach and back away from
the geometry if this data is not included in the offset memory.
Tool shape and direction is selected in one of two ways depending
on the control: from a library or by an approach vector.
Operating a CNC Machine
Lathe Tool Selection

Choosing Cutter Shape Cutter Orientation


Pointing Which Direction
Operating a CNC Machine
Lathe Tool Selection
Operating a CNC Machine
Lathe Tool Selection

For CNC lathes with multiple


cutters, Tool 1, as listed in the
setup document, must be
placed in Slot 1 in the turret.
Tool 2 goes in Slot 2, and so
on.
Operating a CNC Machine
Loading Mill Tools
Some mills with tool storage drums or turrets require the same
order, Tool 1 must go in Hole 1 (or they are set that way for
simplicity). Tool 1 is always in Hole 1.
Modern machining centers use random tool storage.
Random storage is more efficient during tool changing: the
outgoing tool can go into the incoming tool’s empty hole in the
drum.
There are two ways to load random tools.
Operating a CNC Machine
Loading Mill Tools
First Method
After loading this tool into Hole 8 in the
storage drum, the operator must then
enter the tool storage page with the
tool number from the setup document
in Hole 8.
The drum hole number is not the tool
number. Tool memory must know what
tool number is in Hole 8 initially. After
the setup, during a program run it will
use it then replace it in the closest hole
– not necessarily Hole 8. The control
will remember and track where it’s at
in the drum.
Operating a CNC Machine
Loading Mill Tools
Second Method
Example: To load Tool 06 into the machine, write the following
MDI command:
T06 M6:
After touching cycle start, the drum will roll to the current tool
06 change position. Then the changer will place that tool in the
spindle.
Now manually remove it from the spindle and replace it with the
new Tool 06 listed for this setup.
This method is more foolproof. It doesn’t matter what hole the
tools are in, the control will know.
Operating a CNC Machine
Loading Mill Tools

In industry, most use Method 1 due to the improved turnaround


time for the setup. But one must be certain to write the tool
numbers into the correct holes in the tool storage page. Notes
help to get it right if there are several tools.
Plus industrial shops often have a standard preload of commonly
used tools ready to go. Programmers try to call upon the
standards, thus there’s no turnaround time other than replacing
dull tools.
Operating a CNC Machine
Selection of Mill Tools
Operating a CNC Machine
Selection of Mill Tools
Operating a CNC Machine
Vice position with respect to machine’s reference Point

Machine Set Point

Cutting tool
Front Jaw

Fixed Jaw
Machine Vice

Machine Table
Operating a CNC Machine
Changing Tool and Tool Height Offset

Care must be taken to retract above any obstructions.


In addition cutting tools will be of different lengths.

Crash

• Selecting a new tool M06


• Tool setting procedure for all new tools
• Example tool 1 may be shorter than tool 2 by 30 mm
• Use the G43 to select a new height offset
• e.g. G43 Z-120.0 H02 where H is the address location for T02
length offset
• Use the G49 to cancel previous height offset
Operating a CNC Machine
Changing Tool and Tool Height Offset
• Most components require the use of tools of various diameters
and length
• Each tool length must be recorded by the machine tool
controller
Operating a CNC Machine
Changing Tool and Tool Height Offset
Operating a CNC Machine
Changing Tool and Tool Height Offset
Operating a CNC Machine
Alarm Conditions
Depending on the control sophistication, when something goes wrong, the
error message may be easy to interpret or completely unfathomable.
Today some controls just tell you what’s wrong. Others provide an error
code and, with the help of a manual, you must decipher the type error –
which is not necessarily the reason for the problem.
For example: SYNTAX ERROR. You know it’s the entry sequence or form, so
next you do your investigation. Often when a control errors out, it stops on
the bad line – but not always!
With time, you’ll learn the error codes on your machine.
You’ll also get a sense of what might be wrong from the place in the
program where the alarm came on.
Operating a CNC Machine
Alarm Conditions

Alarms fall into categories:


Data Entry – Syntax command is senseless
Missing Data an incomplete command or cycle
Math Error decimal points, nonsense numbers
Extra Data conflicting commands or words
Servo Error cannot correct lag
Fluid/Air Low coolant, oil, pressure
Conflicting Codes
Radical Command to go beyond capacity
Operating a CNC Machine
Emergency Plans
The most critical aspect of production monitoring is to pre-plan for
emergencies.
The point is, things do go wrong, no matter how well we set the machine
up or how many successful cycles it has run.
For example; sand pockets in castings or catastrophic tool failure.
At those times, the best operator actions only happen if there has been
some pre-planning and practice carrying out the plan.
Emergencies fall into three general categories:
1. Something doesn’t sound right. It seems wrong, but no outward signs
are showing.
2. Something is showing: serious noise, smoke, cutter loading, or
vibrations not seen before.
3. The big one—an all-out emergency.
Operating a CNC Machine
Emergency Plans

Each category can be halted or prevented with a specific action.


They are in ascending order of seriousness, depending on how
quickly the machine must be stopped:
Single Block Mode – completes command
Feed Override to Zero – stops cutting motion
Rapid Override to Zero – stops at next rapid
Slide Hold – stops axes but not spindle
E-Stops – stops everything.
Program Planning
Choosing how you will hold the work, and the Program Reference Zero location
and axis orientation, are inter-twined decisions, made at the same time and
made first.
They all must be chosen before any other planning is done.

Turning Job PRZ


Commonly the lathe PRZ is chosen at the outer tip of the work.

Centerline X
Outer face Z
Program Planning
Turning Job PRZ
Sometimes, the outer face isn’t the functional basis for the object. There are
three PRZ options for this job:

1. Write the program from the existing PRZ,


but clearly document that the setup person is
to leave 2.050 excess beyond PRZ, for facing,
and turning the threads.

2. Set the PRZ at the outer face, then re-


compute the coordinates for the Z axis. Be
certain to document that on your setup sketch

3. Write the program from the existing PRZ


but use a coordinate shift in the program. Be
certain to document that on your setup
sketch.
Program Planning
Turning Job PRZ
Since this job requires machining on both ends, would you plan it for one or two
setups?
Does the internal threaded hole make it impossible to setup as a bar job?
Program Planning
Mill Job PRZ
Similar to lathe selection, above all priorities, the datum/functional basis of
the part drawing determines PRZ location.
Next, choose a location that lends itself to reliable location within the setup—
flat surfaces, corners and holes are commonly used for verification.
Choose PRZ features that lead to further datum priorities, especially when
the part will undergo more than one setup change.
All other PRZ selection suggestions beyond this are only convenience
guidelines.
The lower left corner at the work’s
top surface is the most commonly
chosen location

Easily verified, choosing the PRZ in


the Lower Left Corner (LLC) also
places the work in the 1st quadrant.
Program Planning
Mill Job PRZ
Program Planning
Mill Job PRZ
For odd-shaped work, or where there is no reliable PRZ/Datum basis machined
on the raw stock yet:
We design fixtures to hold rough castings and forgings for production work.
How would you set up to hold and verify PRZ on this rough casting before any
machining has occurred?
Program Planning
Mill Job PRZ
One solution is to build a setpoint into the fixture. The setpoint isn’t the PRZ,
it is a known distance from it. That must be documented in the planning.

In a small shop, a machinist might


build this fixture – but that would take
time away from part making. In
medium to large shops the task is
given to a Tool and Die Maker – usually
a senior member of the team and a
highly skilled person.

They also make stamping extrusion


and forming dies, assembly jigs,
plastic molds and a lot of other
challenging shop aids or production
accessories like this mill fixture.

Tool and Die is a rewarding, well-paid career that begins by learning basic machining!
Program Planning
Selecting holding methods
Often the greatest challenge is how will the work be held?
We’ve just looked at fixtures, a common industrial solution.
But remember, if they are planned, then one must also begin another chain
of events to get the fixture ready when the job goes to the machine!
In the drive to be creative, don’t dismiss the obvious simple solutions of:
Standard chucks
Standard Collets
Vises
Direct Bolt Downs (on mills)
Program Planning
Selecting holding methods
When deciding between standard tooling and custom made, consider how
many times this job is anticipated to be run.
Sometimes, a few hundred dollars spent on custom holding tools returns
thousands in quick machine setup and quick part changing, compared to
using standard tools.
Again, evidence of how critical planning can be to a company.

Setup Time verses Tooling Cost


Program Planning
Selecting holding methods
Another good solution are soft jaws usually made by the setup person, both
for lathe or mill work.

Don’t miss the tip of using the part program to make the jaws! It’s not a beginner
method because it requires editing part program compensation to cut to the other
side of the geometry line, along with changing or hiding other program details. But it
does work!
Program Planning
Selecting holding methods
How else would you hold this ball end clevis to cut the threads without a set of
soft jaws?
Program Planning
Selecting holding methods
Program Planning
Selecting holding methods
Program Planning
CAM Mill Programming for CNC Machinist
Geometry Acquisition
A CAM job today usually begins by importing a CAD engineering drawing as a
wireframe or solid model created with CNC in mind.
But the part geometry model can be created by using the draw utility in CAM
software.
CAM Mill Programming for CNC Machinist
Geometry Acquisition
• Unless the lathe features multi-axes, or live tooling, flat two-
dimensional geometry is all that’s needed for X-Z motion.
• However, for milling, both 2-D and 3-D part models are
useful. Some shapes are simple enough that 2-D wireframes
are fine.
• In CAM software, when the drawing is flat and two-
dimensional, we add cut depth during parameter entry.
• But by adding Z depth to the 3-D drawing, the toolpath
parameter for Z depth will be automatic.
CAM Mill Programming for CNC Machinist
Geometry Acquisition
Before starting to draw, scan these 10 definitions.
Coordinate position – (X, Y, Z relative to origin), End point – of another
existing entity, Middle point – along another entity, Relative point – X, Y, Z
distance from any other known point, Polar position – angular and radial
distance, Parallel distance – on a line a given distance from another entity,
Arc center – center of existing arc, Tangent or perpendicular – to another
entity, Point – selects a unique previously drawn, Mouse sketch
approximate – no finite location until after it’s placed on the drawing. At
placement, the software will show the position in X, Y, and Z.
They are the basics and transcend all CAD/CAM programs.
If you’ve drawn before, they will be the same on any software, for they are the
possibilities.
CAM Mill Programming for CNC Machinist
Geometry Acquisition
CAM Mill Programming for CNC Machinist
Geometry Acquisition
CAM Mill Programming for CNC Machinist
Geometry Acquisition
CAM Mill Programming for CNC Machinist
Tool path

The solid is done and the job has been planned to hold excess grip stock in
a vise—to be milled away later.
Note axis directions and part orientation.
Note the program segments.

PRZ
CAM Mill Programming for CNC Machinist
Tool path
To create an effective toolpath, the programmer must first plan the
sequence of operations.
They will become segments that, when linked together, form the
complete toolpath.
Segment 1: Cut Outer Profile(s)
Segment 2: Plunge and Cut Pocket
Segment 3: Drill the Central Hole
CAM Mill Programming for CNC Machinist
Tool path
It begins with major parameters

First: Machine Type

Next: Material Manager then Contour


CAM Mill Programming for CNC Machinist
Tool path

Chain Elements

End
Chain

OK
CAM Mill Programming for CNC Machinist
Tool path

Clicking
+ End Chain and
√ OK

Parameter pages appear for that segment.


You’ll need to supply:
– Cutter data
– Number of passes and several more
CAM Mill Programming for CNC Machinist
Tool path
CAM Mill Programming for CNC Machinist
Tool path

Previously we used to move a milling cutter from point A to B in a


straight or curved path to give shape.
High-speed machining can be defined as taking shallow depths of cuts at
a higher federates (600+inch/min) and spindle speeds (10 – 15000 RPM
or higher). At these condition tool path strategies had to be
implemented to protect the machine and cutting tools.
The first condition is to make sure that the tool path had no right angle
turns. As the extreme feeds create staggering physical loads at hard
corner which can damage the machining as well as cutter.
The second and third conditions are to avoid 100% burial and then
bashing forward in a linear path – If not, the chips are trapped in and
recut.
CAM Mill Programming for CNC Machinist
Tool path
CAM Mill Programming for CNC Machinist
Tool path
Spiral Entry
Spiral Entry: An elegant spiral motion while
plunging, rather than caveman hammering down
like a drill press. Cutter shock and stress reduce
significantly.

Trochoidal Motion

Trochoidal Motion: Advancing in a circular motion,


taking a little bite/shave of the material with each
cutter arc into and out of the work.
The spiral plunge and then moving immediately into
the little circular contact with the work, feed rates
remain high yet not break the tool
CAM Mill Programming for CNC Machinist
Tool path

Trochoidal toolpath example


CAM Mill Programming for CNC Machinist
Tool path
Dynamic tool path

Large axial engagement

No sharp corners
-Spiral entry
-Smooth entry/exit

Climb cutting always

Micro-lift rapid return reengage


CAM Mill Programming for CNC Machinist
Tool path
Feature based machining:
Uses only solid model for part geometry. In a single operation, analyses the
model, detects all machining definition features in a specific plane, and
automatically generates all of the 2-D milling toolpaths necessary to
completely machine the selected features.
CAM Mill Programming for CNC Machinist
Tool path
Rest milling:
Large cutters are generally used to rough out a pocket. But the cutter could
not get into corners or narrow areas – leaving material uncut. The rest
milling compares the roughing results to the solid model in order to identify
uncut material. Then it creates a dynamic tool path that removes the “rest”
of the uncut material.
CAM Mill Programming for CNC Machinist
Tool path
Optimized roughing:
In standard roughening, several down passes are made in stages. However,
in dynamic roughing, cutting tool is spiraled down as deep as possible, the
rough with the cutter’s side teeth as it is stepped up, with each pass cutting
the fullest axial engagement.
CAM Mill Programming for CNC Machinist
Tool path
Peel milling:
High-speed peel mill toolpaths allow for efficient constant climb milling
between two selected contours or along a single contour. It uses trochoidal
motion with accelerated back feed moves when the cutting tool is not
engaged in material. Peel mill can machine more than one contour by
selecting those together.
What is learnt

You might also like