Computer Aided Part
Programming
Compiled by:
Prof. A. M. Gohil
Institute of technology
Nirma university
Why it is needed?
Large amount of manual calculation
Improve accuracy
Reliability
Computer help in proving the part
program
Same part program can be used for all
the machine
System Configuration
Part Program
Processor
Input
Cutter Location
Data
Post Processor/
Universal NC Blocks
Post processor
Computer Aided Part
Programming system
Procedural system
APT (Automatically Programmed Tools)
Massachusetts Institute of Technology,1952
UNIAPT, ADAPT, NELAPT, EXAPT
GNC, GTL, COMPACT-II
Graphical systems
Mastercam, Edgecam, Pro-e, Catia, Ideas
APT Language Structure
Punctuation
Words
Keywords
Symbols
Labels
Numbers
Angles
Arithmatic
Punctuation
/ P1 = POINT/20.0, 40.0, 60.0
= C1=CIRCLE/25,50,30
() BA = 5 * (4 + 2)
$ P1 = POINT/20.0, 40.0, $
60.0
$$ $$ Programer Name
) 1234)
Words
It is build up from one to six letters or
numerals with the first one being a
letter.
P, P00001
No special character is allowed in the
word
Keywords
Reserved names
All key words are made up of two to six
letters, without any numerals
POINT, CIRCLE, RIGHT, TANTO, INTOF
Keywords are divided in two class:
MAJOR word
It defines the type of the statement.
MINOR word
It gives required parameters and modifiers.
P2 = POINT/INTOF, L1, L2
Symbols
They are the words used as substitutes for
geometrical definitions and numerical values.
First character of the symbol must be a letter.
A symbol cannot be the same as key words.
A symbol must be defined before it is
referenced in a subsequent part program.
P1 = POINT/20.0, 40.0, 60.0
Labels
Label names are used to reference a
statement so that control can be transferred
to that statement changing the usual linear
executing sequence.
Labels are identical to words with the
difference that all the characters in a label
can be numerical.
A label must be terminated by a right
parenthesis.
1234)
Numbers
If a number is unsigned, the positive
sign is assumed.
No distinction is made between integer
and real numbers.
-1234.0
259.0
0.145
Angles
Angles are quoted as degrees and
decimal fractions of a degree
Ex. 13 42’ would be 13.70.
Angles have a positive value when
measured in an anti-clockwise direction
from the positive X-axis.
Arithmatic
() Parenthesis
** Exponentiation
*, / Multiplication, Division
+, - Plus, Minus
ABS, SQRT, SIN etc.
Types of statement in APT
language
Geometry statement
POINT, CIRCLE, LINE
Motion statements
GOTO, FROM, CUTTER
Post processor statements
COOLNT, RAPID, END, MACHIN
Auxiliary statements
CLPRNT, INTOL, OUTTOL
POINT by rectangular
coordinate system
P1 = POINT/20.0, 40.0, 60.0
POINT by intersection of two
lines
P2 = POINT/INTOF, L1,L2
POINT by intersection of line
and a circle
XSMALL
XLARGE
XSMALL
YSMALL
XLARGE
YLARGE
YSMALL
YLARGE
P3 = POINT/XSMALL, INTOF,L1,C1
POINT by intersection of two
circle
P3 = POINT/XSMALL, INTOF,C1,C2
POINT by polar coordinates
THETAR
YZPLAN
ZXPLAN
P1 = POINT/RTHETA, XYPLAN, 141.42,45
POINT on a circle at an angle
with x-axis
P1 = POINT/C1, ATANGL, 42
POINT at center of a circle
P1 = POINT/CENTRE, C1
LINE by two points
L1 = LINE/X1,Y1,Z1,X2,Y2,Z2
L1 = LINE/P1,P2
LINE as one of the axis
YAXIS
ZAXIS
L1 = LINE/XAXIS
LINE by a point and a parallel
line
L2 = LINE/P1,PARLEL,L1
LINE by a point and
perpendicular line
L2 = LINE/P1,PERPTO,L1
LINE by a parallel line at a
distance
XSMALL
YSMALL
YLARGE
L2 = LINE/PARLEL,L1,XSMALL,20
LINE by a point and angle
made with a line
L2 = LINE/P1,ATANGL,L1,31
LINE by angle with X-axis and
intercept with Y-axis
L1 = LINE/ATANGL,-43,INTERC,103.28
LINE by a point and tangent
circle
RIGHT
L1 = LINE/P1,LEFT,TANTO,C1
LINE tangent to two circle
L1 = LINE/LEFT,TANTO,C1, LEFT, TANTO,C2
L2=LINE/RIGHT,TANTO,C1,RIGHT,TANTO,C2
CIRCLE by centre and radius
C2 = CIRCLE/80.14,57.31,35.26
C2 = CIRCLE/CENTRE, P1, RADIUS, 35.26
CIRCLE by centre and
tangential line
C2 = CIRCLE/CENTRE, P1, TANTO, L1
CIRCLE by a point on
circumference
C2 = CIRCLE/CENTRE, P1, P2
CIRCLE by three point
C1 = CIRCLE/P1, P2, P3
CIRCLE by a centre point and
tangential circle
SMALL
C2 = CIRCLE/CENTRE, P1, LARGE, TANTO, C1
CIRCLE by two tangential lines
and radius
C1 = CIRCLE/XSMALL,L1,YSMALL,L2,RADIUS,15
CIRCLE by two tangential
circle
C3 = CIRCLE/XLARGE, IN, C1, OUT, C2, RADIUS, 10
CIRCLE by tangential line and
circle, and radius
C2 = CIRCLE/YLARGE, L1, XSMALL, OUT, C1, RADIUS, 10
PLANE by three point
PL1 = PLANE/P1,P2,P3
PLANE by a point and parallel
plane
PL2 = PLANE/P1,PARLEL,PL1
PLANE by coefficients of the
plane equation
aX+bY+cZ=d
PL2 = PLANE/0,0,1,40
Vector by X, Y , Z component
V1 = VECTOR/100,100,50
VECTOR by two points
V1 = VECTOR/P1,P2
PATTERN by first and last
points and number
PAT1 = PATERN/LINEAR, P1,P2,12
PATTERN by point and vector
PAT1 = PATERN/LINEAR, P1,V1,12
PATTERN by point, vector and
increment along vector
PAT1 = PATERN/LINEAR, P1,V1,INCR,30,20,2,AT,15,20,10
PATTERN by incremental
angle, angle to fill and number
PAT1 = PATERN/ARC, C1,45,195,CCLW,6
PATTERN by incremental angle
and number
PAT1 = PATERN/ARC, C1,45,CCLW,4
MOTION COMMANDS
It describe the actual sequence making
use of the geometry elements defined
earlier.
Setup commands
Point-to-point motion commands
Continuous path motion commands
SETUP COMMAND
Starting Point
FROM/-30,-5,0
SETUP COMMAND
Cutter
CUTTER/d,r,h
SETUP COMMAND
Surfaces
DS – Drive Surface, PS – Part Surface, CS – Check Surface
SETUP COMMAND
TOLERANCES
INTOL/0
OUTTOL/0.01
OR
TOLER/0.01
INTOL/0.02
OUTTOL/0.01
INTOL, dsval, psval, ch1val, ch2val
Point-to-point motion command
GOTO
GOTO / 10,20
GOTO / PAT1
GOTO / PT1
Point-to-point motion command
GODLTA
Incremental values can be given
GODLTA/dx, dy, dz
Continuous Path commands
Startup commands
GO / TO, ds, ON, ps, PAST, ds
Motion commands
TO
ON
PAST
TANTO
GOLFT / ds, TO, cs
Auxiliary commands
Units
UNITS/MM
Clearance Plane definition
CLEARP/XYPLAN, z
Coolant
COOLNT/ON
ON, OFF, MIST, FLOOD
Auxiliary commands
Cutter compensation
CUTCOM/ON
ON,OFF,RIGHT,LEFT
Fixed sequence of motion
CYCLE/DRILL, z, MMPR, f, r
DRILL,FACE,TAP,BORE,REAM
IPM,IPR,MMPM,MMPR
CYCLE/ON
ON,OFF
Auxiliary commands
Delay time
DELAY/t
DELAY/REV,n
Feedrate value
FEDRAT/MMPR
IPM,MMPM,IPR,MMPR,PERREV,(PERMIN,f)
Loading the tool
LOADTL/tool no., magazine position
Auxiliary commands
Rewinding the tape
REWIND
Safe position to change the tool
SAFPOS/x, y, x
Spindle rotation
SPINDL/RPM,n,CLW
SFM,RPM,SMM
CLW,CCLW
Auxiliary commands
Specifying part no.
PARTNO/Example No.1
End of the program
FINI
Choosing the postprocessor
MACHIN/name, <parameters>
NOPOST
Printing the information
PRINT/ON
ON, OFF
Example
Creating Points
PT1 = POINT / 0, 0, 0
PT2 = POINT / 100, 0, 0
PT4 = POINT/ 150, 75, 0
PT5 = POINT/ 135, 90, 0
PT6 = POINT/ 135, 75,0
PT7 = POINT/ 0, 90,0
PT8 = POINT/ 50, 50, 0
Creating Lines
L1 = LINE/ XAXIS
L2 = LINE/ PT2, ATANGL, 30, L1
L3 = LINE/ PT4, PERPTO, L1
L4 = LINE/ PT5, PT7
L5 = LINE/ YAXIS
Creating point 3
PT3 = POINT/ INTOF, L2, L3
Creating Circles
C1 = CIRCLE/ CENTRE, PT6, RADIUS, 15
C2 = CIRCLE/ CENTRE, PT8, RADIUS, 25
Creating Pattern
PAT1 = PATERN/ ARC, C2, 0, 360, CCLW, 8
Tool Motion
PL1 = PLANE /PT1,PT2,PT7
GOTO/-50, -50, 50
GO / TO, PL1, TO, L1, TO, L5
GODOWN/10
GOFWD/L1, PAST, L2
GOFWD/L2, PAST, L3
GOLFT/L3,TANTO,C1
GOFWD/C1,TANTO,L4
GOFWD/L4,PAST,L5
GOLFT/L5,PAST,L1
GOUP/10
GOTO/-50,-50,50
Complete program
PARTNO/Milling 1
MACHIN/MILL
UNITS/MM
PT1 = POINT / 0, 0, 0
PT2 = POINT / 100, 0, 0
PT4 = POINT/ 150, 75, 0
PT5 = POINT/ 135, 90, 0
PT6 = POINT/ 135, 75,0
PT7 = POINT/ 0, 90,0
PT8 = POINT/ 50, 50, 0
L1 = LINE/ XAXIS
L2 = LINE/ PT2, ATANGL, 30, L1
L3 = LINE/ PT4, PERPTO, L1
L4 = LINE/ PT5, PT7
L5 = LINE/ YAXIS
PT3 = LINE/ INTOF, L2, L3
C1 = CIRCLE/ CENTRE, PT6, RADIUS, 15
C2 = CIRCLE/ CENTRE, PT8, RADIUS, 25
PAT1 = PATERN/ ARC, C2, 0, 360, CCLW, 8
PL1 = PLANE /PT1,PT2,PT7
CUTTER/5
FEDRAT/MMPM,50
SPINDL/ RPM, 1000, CLW
INTOL/0.01
OUTTOL/0.01
SETPT = POINT/-50, -50, 50
FROM/SETPT
RAPID
GO / TO, PL1, TO, L1, TO, L5
SPINDL/ON
COOLNT/ON
GODLTA/0,0,-10
GOFWD/L1, PAST, L2
GOFWD/L2, PAST, L3
GOLFT/L3,TANTO,C1
GOFWD/C1,TANTO,L4
GOFWD/L4,PAST,L5
GOLFT/L5,PAST,L1
GOUP/10
RAPID
GOTO/SETPT
COOLNT/OFF
SPINDL/OFF
REWIND
FINI