CNC Turning Programming Fundementalsls, Step by Step
CNC Turning Programming Fundementalsls, Step by Step
MEL58
RAMMING FUNDAMENTA
NC PROCEDURE
The following arethe basicstepsin NC procedure
o processplanning
o part programming
o Part program entry
o Proving the part program
o Production
A) PROCESSPLANNING
The part programmerwill often carryoutthe task of processplanning.Processplanning
is the procedureof deciding what operationsare to be done on the component,in wtrat ordef
and with what tooling and work holding facilities. Both the proceis planning and part
programmingaspectsof manufactureoccur after the detail drawingsof a componenthave been
prepared.The following procedure may be used as a guide to assist the programmer,by
describing
rDlng eac
eachSsteprequired
ul
in preoarinsthe method
m
methodo
of nrocfirction
tlon
PROCESSPLANNING
o
o Determinetheorderof machiningandthetoolingstations.
. D;t"
operator
Determinecutting speedsbasedon
- Componentmaterial,methodof driving, rigidity of component
- Tooling selectedfor roughingand finishing
o Determne the depths of cr,4and feeds for roughing operations
o Determinesurfacefinish requirements,the cutternoseradiusmost suiteclfor
finishing operationsand determinefeed rates.
r Allocatestool o&g!!3s required
. Cqmpleteplanningsheet
o
ART PROGRA
NG
42
CAD/CAM LABORATORY
MEL58
Dryrun
. Graphicalsimulation.
Visual Inspection : It representsthe method of checking visually the program presentin the
memory of the CNC machine.In this, actualprogramis run and the programmedmovementsin
all axesare to be checkedalong with ensuringthe tool offset and cutter compensationfeatrrre.
This methodrepresentsthe leastform of verificationand should not be relied up on entirely.
43
CAD/CAM LABORATORY
MEL58
PART PROGRAMMINGGBOMETRY
A. COORDINATE SYSTBM FOR A CNC LATHE.
Machining of a workpieceby an NC programrequiresa coordinatesystemto be appliedto
the machinetool- As all machinetools havemore than one slide, it is importantthat each
slide
is identifiedindividually. Thereare two planesin which movementscan takeplace
. Longitudinal.
o Transverse.
Eachplane is assigneda letter and is referredto as an axis.
o Axis X
. Axis Z
The two axis are identified by upper caseX,Zand the direction of movementalong each
axis
(+) or (-). The Z axis is alwaysparallelto the main spindleof the machine.The X axis
is
alwaysparallelto the work holding surface,and alwiys at right anglesto the Z axis. The
coordinatesystemfor tuming operationsis shown in figure below :
44
MEL58
CAD/CAM LABORATORY
+
I
Fio 1, COBRDINATE
S Y S T E MF O R T U R N I N GO P E R A T I O N S
NE ZERtr PIINT
WI R K P ] I C f Z E R D P N I N T
RfFfRfNCE PIINT
45
CAD/CAM LABORATORY
MEL58
is however advisable to place the workpiece zero point in such a manner that the dimensions
in
the workpiece drawing can be conveniently coni'erted into coordinate values and
orientation
when clamping 1 chucking, setting up and checking, the traverse measuring system
can be
effectedeasily.
For turned parts, the workpiece zero point should be placed along the spindle
axis
(centerline), in line with the right iand or left hand enclface of the finished
contouras shown
'
in figure. Occasionallythe workpiecezero point is also calledthe "programzero point.',
REFERNCE POINT ( R) : This point servesfor calibratingand for controllingthe
measuring
systemof the slides and tool traverses.The position of theieference point as ,ho*.,
in figur!
below is accuratelypredeterminedin every traverseaxis by the trip dogs and limit
switches.
Therefore,the referencepoint coordinatesalways have the same preciselyknown
numerical
,
value in relation to the machinezero point. After initiating the control .yrt.-,
the reference
point must always be approachedfrom all axes to calibratethe traverse
measuringsystem.If
currentslide and tool position datashouldbe lost in the control systemas for."urr1pt.,
through
an electricalfailure, the machinemust againbe positionedto the referencepoint
to re-establish
the properpositioningvalues.
C. NC- RELATED DIMENSIONING
Dimensional information in a workpiece drawing can be statedin two ways :
P1
P2
P3
F4
P5
F6
P7
PE
P9
Flg
A. Absotute
Dlnenslons
o
eo
o
50
o
30
-2n
-70
Incremento.(
FIE
E.
lncr^emental
IJlrnenslons
dlnenslons
Incrementat
Coordlnates
46
CAD/CAM LABORATORY
MBL58
Incremental dimensions are distance between adjacent points. These distances are converted
into incrementalcoordinatesby acceptingthe last dimensionpoint as the coordinateorigin for
the new point. This may be comparedto a small coordinatesystem,i.e. shifted consequently
frorn point to point as shown in figurer B. Incrementaldimensionsare also frequently called
"Relativedimensions"or "Chain dimensions".
NC PROGRAM BUILD UP
In an NC program the machining steps(Operations)for producing a part on the machine
tool are laid down in a form that the control systemcan understand.A program is composedof
severalblocks. A block is a collection of NC words. An NC word is a collection of address
letterand a s e
oIf num
numbers.Table
e showsthe addressletter S :
AddressCharacters
Character Meaning
Rotationabout.X-axrs
A
B
Rotationabout,Y-axrs
Rotation about, Z-axrs
C
D&E
Rotationaboutadditionalaxis
Feed
F
Preparatoryfunction,identifuinethe action to be executed
G
Interpolationparameter/ Threadpitch parallel to X-axis.
I
Threadpitch parallelto Y-axis
J
Threadpitch parallelto Y-axis
K
Auxiliarv function
M
N
Block Number
P,Q,R Threadmovementparallelto X,Y,Z axis respectively.P & Q
are also usedas parametersin cycles.
Spindlespeed
S
T
Tool
U.V.W Secondmovementparallelto X,Y,Z axis respectively
X
Movementin X-axis
Y
Movementin Y-axis
Z
Movementin Z-axis
All the NC words may not be used on every CNC machine.Using these words as an
example,the com
tion of a block is assembled
as follows:
PART PROGRAMFORMATS
The order in which thesewords appearin a block of instructionsis called the format.
Basicallythereare two typesof format:
. Fixed Block Format
-Fixed sequentialformat
-Tab sequentialformat
. Word Address Format
47
CAD/CAM LABORATORY
MEL58
Example:
b)Tab Sequential Format : The words in eachinstruction/ block are always provided in the
same sequencebut each word is precededby the TAB character.If instructions remain
unchangedin succeedingblocks, the instructionsneednot be repeatedbut TAB charactermust
be punched.Here also,the identifuingletteraddressneednot be em
Example:
2. WORD ADDRESS FORMAT: Each word is precededand identified by its letter address.
This format enablesinstructions which remain unchangedfrom the precedingblock, to be
omitted from succeedingblocks. This system speedsprogramming, and tape lengths are
considerablyreduced.This is the format adoptedby most CNC machinecontrol units. Detailed
format classification is provided by the control systemmanufacturer.
M CODES
M00
M02
M03
M04
ProgramStop
OptionalStop
SpindleForward(CW)
M0s
SpindleStop
Tool Chanee
CoolantOn
CoolantOff
Vice Open
Vice Close
SpindleForward,CoolantOn
SpindleReverse,CoolantOn
ProgramEnd
Door Open
M06
l\{08
M09
Ml0
Ml1
M1 3
ltrl4
N{30
M38
M39
M98
M99
(CCW)
SpindleReverse
DoorClose
Subprogram
Cali
Subprogram
Exit
48
CAD/CAM LABORATORY
MEL58
49
CAD/CAM LABORATORY
MEL58
PREPARATORYFUNCTION (G-Codes).
G CODES
G00
G0r
G02
G03
G04
G20
G2l
G28
G40
G4l
G42
Gs0
G70
G7l
G72
G73
G74
G7s
G76
G90
G94
G96
G97
G98
G99
Positioning(Rapid Tranverse)
Linear Interpolation(Feed)
Circular Interpolation(CW)
Circular Interpolation(CCW)
Dwell
lnch Data Input
Metric Data Iqput
Referencepoint return
Tool noseradiuscompensationcancel
Tool noseradiuscompensationleft
Tool noseradiuscompensationright
Work coordinatechange/.Max.Spindlespeedsettins
Finishingcycle
Multiple Turning Cycle in turning
Stock removalin facing
Patternrepeating
Peckdrilling rn Z axis
Grooving in X axis
Ihreqd cutting cycle
Cutting cycle A (Turning)
Cutting gycleB (Facing)
Constantsurfacespeedcontrol
Constantsurfacespeedcontrol cancel
Feedper minute
Igg4l.r revolution
GOOFAST TRAVERSE
Illustration
A rapid traverse instruction traversesthe
tool to the target point at the maximum
traverserate. The tool normally takes the
shortestpath from the starting point to the
destinationpoint. The rapid traverseis used
for movements where no tool is in
engagement.
50
CAD/CAM LABORATORY
MEL58
Illustration
Illustration
x1.5
ul.5
Pls00
Illustration
A G28 causes a fast traverse to the specified G28X35 Z5
positionand then to the machinedatum.
G28U0 W0
5I
CAD/CAM LABORATORY
MEL58
part drawing to programa contouringmotion. Theseare the G41 and G42 codesfor
tool
radius compensationon the left and right hand sides of a profile. A left or
right
compensationis basedon the fact that the tool is on left or right hand side when one goes
along the part profile in the directionspecifiedby the contouringmotion statementsin
the
am. A G40 code is provided to cancelthe cutter radius com
GsOCOORDINATE SETTING
G50 enablestool noseradiusco*pensat
uses.coordinate setting block has "x","2","u",
block doesnot haveall these.
G96CONSTANT SURFACESPEED
n
figure' The peripheral speed or cutting speed is thus the fully stretchedchip length
producedin one time. The cutting speedsvary in direct relation to the diameters,
even if
the numberof revolutionsper minute is the samein all cases.
The correctselectionof the cutting speedfor turning is very important,
Cutting speedtoo low : Time loss and low surfacefinish. With increasingcutting speed
the surfacespeedis improved.
Cutting speedtoo hiqh : Hish tool wear.
Illustration
52
CAD/CAM LABORATORY
G99FEED PER REVOLUTION
Descrintion
This command coupled with the F word is used
to speciff a feed rate per revolution. This can
be in mrn/rev or inch/rev. the feed rates
available in the machine simulation are 0.01200 mm/min. Recommended feed rates are
published by tool and cutter manufacturers,
along with recommendedcutting speeds.If the
feed rate is expressedas mm/rev, a simple
calculationcan be usedto convertto mm/min.
FEED, mm/min:FEED(mm/rev) X spindle
speed(r.p.m)
MEL58
Illustration
F=IJlspto.cer'1ent
o,[ong the Z oxls
per^ nevotr-ltlon of
the
workplec
or000
IBTLLETX20 260
G2r/G20G98/G99c40
G 5 0S1 8 0 0
G28U0 W0
M 0 6T0 1 0 1
M03/M0451000
G00x2r
zr
EXPLANATION
o1000
53
CAD/CAM LABORATORY
MEL58
G28 U0 W0
M0s
M02/30
METAL
N
BILLET MATERIAL : Aluminum
OPERATIONS
FOR
ART
F'EED
mm/min
TURI\ING
0.25- 0.5
THREADING
SIMPLE FACING
2 n r n rf o r
fACING
tl
tl
'l
fi?
tFtl
tl
DWG.NO.I
PLANNING
ANDOpnnnrtor,lssunnr
Simple
Faci
MATERIAL: Aluminum
DWGNO:1
SDJCR
t2t2llll
CAD/CAM LABORATORY
MEL58
TOOL OFFSETSHEET
Tool offsetNo.
Compensations,mm
X
I
Toolnose
Radius. mm
Standard Tool
Number
R
0.4
(Drawing No .1
(CNC programfor Simple Facing
(Material to be removedby facing :2mm
ol00l
[BILLETX22 260
G2l G98
G28U0 W0
M06 T0303
M 0 3S1 2 0 0
G00x22zr
GOlz-0.5F4s
GOIXO
GOIZI
G00x22
G}l z-r F45
ProgramNumber 1001
GOIXO
GOIZT
G00x22
G}rz-r.5
GOIXO
GOIZI
G00x22
G0rz-2
GOIXO
GOIZI
G00x22
G28U0 W0
M05
M30