07 - Apt Language
07 - Apt Language
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
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/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
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, P2
CIRCLE by three point
C1 = CIRCLE/P1, P2, P3
CIRCLE by a centre point and
tangential circle
SMALL
C1 = CIRCLE/XSMALL,L1,YSMALL,L2,RADIUS,15
CIRCLE by two tangential
circle
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
FROM/-30,-5,0
SETUP COMMAND
Cutter
CUTTER/d,r,h
SETUP COMMAND
Surfaces
INTOL/0.02
OUTTOL/0.01
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
TO
ON
PAST
TANTO
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
GOTO/-50, -50, 50
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
CUTTER/5
FEDRAT/MMPM,50
SPINDL/ RPM, 1000, CLW
INTOL/0.01
OUTTOL/0.01
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