Professional Documents
Culture Documents
APT Language
APT Language
APT Language
y
x
1
Part Programming
APT (Automatically Programmed Tool) is a
software compiler for simplifying numerical
control Programming.
2
APT
APT (Automatically Programmed Tool) is a
software compiler for simplifying numerical
control Programming.
3
APT Characteristics
Three-dimensional unbounded surfaces and points are
defined to represent the part to be made
4
APT is not only a language; it is also the computer program
that processes the APT statements to calculate the
corresponding cutter positions and generate the machine tool
control commands.
To program in APT the part geometry must first be defined.
Then the directed to various point locations and along surfaces
of the workpart to accomplish the required machining
operations.
The viewpoint of the programmer is that the workpiece remains
stationary and the tool is instructed to move relative to the part.
To complete the program, sptolerances must be given for
circular interpolation, and so forth.
Thus, there are four basic types of statements in the APT
language;
5
6
APT Statement Types (5)
7
The general format for geometric statements is:
8
Point (POINT)
y
(3, 4, 5)
PTA
9
Point (POINT)
LIN2
PTB
LIN1
10
Point (POINT)
PTD
x
11
Point (POINT)
PTE
PTF = POINT/ YSMALL, INTOF, C1, C2
PTF C2
x
12
Point (POINT)
PT7= ?
PT7 = POINT/ CENTER, C6
C6
PT7
x
13
Point (POINT)
PT11= ?
PT11 = POINT/ P63, RADIUS, 7.3, ATANGLE, 27
PT11
7.3
27
x
14
Line (LINE)
LIN1= ?
P2
P1
LIN1
x
15
Line (LINE)
LIN4= ?
LIN4 = LINE/ PT6, 15, -30, 3
PT6
L4 (15, -30, 3)
x
16
Line (LINE)
LIN10= ?
LIN10 = LINE/ 20, 3.5, 0.2, 31, 6.2, 1.3
y
(31, 6.2, 1.3)
x 17
Line (LINE)
L12, L14, L15, L16 = ?
L12 = LINE/ PT4, ATANGL, 20, XAXIS
L14 = LINE/ PT1, ATANGL, 40, XAXIS
L15 = LINE/ 32, -3, 2, ATANGL, -15, XAXIS
L16 = LINE/ PT3, ATANGL, 40, YAXIS
y
PT3 L14
40
PT1 L12
L16
PT4
40 20
15 x
L15
(32, -3, 2) 18
Line (LINE)
LINE 2= ?
LIN = LINE/ POINT, ATANGL, ANGLE (in degrees), LINE
y
LINE2
P1
30 LINE1
19
Line (LINE)
LINE 1= ?
LIN = LINE/ SLOPE, SLOPE VALUE, INTERC, MODIFIER, d
where the slope value is y/x. The modifier options are [XAXIS,
YAXIS], and d is the corresponding intercept value on the selected
axis (i.e., modifier).
LINE1
x
(6,0) Point of X-Intercept
20
Line (LINE)
LINE 1=?
LIN = LINE/ ATANGL, DEGREES, INTERC, MODIFIER, d
The modifier options are [XAXIS, YAXIS], and d is the
corresponding intercept value on the selected axis (i.e., modifier).
LINE1
x
d
21
Line (LINE)
LINE 1=?
The LEFT & RIGHT modifier indicates whether the line
is at the left or right tangent point, depending on how
one looks at the circle from the point.
L1
C11
PT51
22
Line (LINE)
LINE 1, 2, 3 =?
L2 = LINE/ PT51, RIGHT, TANTO, C11
L1 = LINE/ PT40, RIGHT, TANTO, C11
L4 = LINE/ PT40, LEFT, TANTO, C11
L3 Right
PT40
L1
Left
Left L4
PT51
Right L2
23
Line (LINE)
LINE 6=?
L6
Right
C4
Left
C3
Right
Left
L8 L9
L7
24
Line (LINE)
LINE 7=?
L7 = LINE/ LEFT, TANTO, C3, RIGHT, TANTO, C4
L7 = LINE/ LEFT, TANTO, C4, RIGHT, TANTO, C3
L6
Right
C4
Lef
C3 t
Right
Left
L8 L9
L7
25
Line (LINE)
LINE 8=?
L6
Right
C4
Left
C3
Right
Left
L8 L9
L7
26
Line (LINE)
LINE 9=?
L9 = LINE/ RIGHT, TANTO, C3, RIGHT, TANTO, C4
L9 = LINE/ LEFT, TANTO, C4, LEFT, TANTO, C3
L6
Right
C4
Left
C3
Right
Left
L8 L9
L7
27
Line (LINE)
LINE 3,4 = ?
y
PNT6 PNT5
LN3
LN4
LN15
LN13
x
28
Plane (PLANE)
LINE 5=?
LN5 = LINE/ INTOF, PLAN1, PLAN2
LN5
PLAN1
PLAN2
29
Plane (PLANE)
PLANE 10 = ?
PLAN10 = PLANE/ PT6, PT12, PT15
PLAN10
PT15
PT6 PT12
y 3.0
PT4
z
PLAN14
30
x
Plane (PLANE)
PLANE 14 = ?
PLAN14 = PLANE/ PT4, PARLEL, PLAN10
PLAN14 = PLANE/ PARLEL, PLAN10, YSMALL, 3.0
PLAN10
PT15
y PT6 PT12
3.0
PT4
z
PLAN14
31
x
Circle (CIRCLE)
CIRCLE 1 = ?
C1 = CIRCLE/ 3, 6, 5, 4.3
C1 = CIRCLE/ CENTER, PT3, RADIUS, 4.3
y
C1
4.3
PT3
(3,6,5)
x 32
Circle (CIRCLE)
CIRCLE 3,7 = ?
y y
LN4
PT5
PT6 PT8
C3 C7
x 33 x
Circle (CIRCLE)
CIRCLE 3= ?
C1
y
3.0
C3
C2
2.0 YSMALL
1.5
YLARGE
LN4 LN6
XLARGE x
34
Circle (CIRCLE)
CIRCLE 1 = ?
y C1
3.0
C3
C2
1.5 2.0 YSMALL
YLARGE
LN4
LN6
XLARGE
x
35
Circle (CIRCLE)
CIRCLE 2 = ?
C1
y
3.0
C3
C2
1.5 2.0 YSMALL
YLARGE
LN4 LN6
XLARGE
x
36
Cylinder (CYLNDR)
37
Cylinder (CYLNDR)
CYLINDER 3 = ?
CYL3 = CYLNDR/ XLARGE, TANTO, PLAN5, YSMALL, TANTO, PLAN10, RADIUS, 2.0
z
PLAN5
2.0
y
PLAN10
CYL3
x 38
Geometry Example
Top view
5.0 in.
The top view of a plate is Tangent point
0.5 in.
Side view 39
Geometry Example
PT1 = POINT/ 4, 5, 0 PT1 = (4,5,0)
41
The Machining Plan
P0 = (0,4,0.1)
Z = 0.0
0.6 in.
42
The Machining Plan
FROM/ PO P0 = (0,4,0.1)
GOTO/ P1
1.0 in. 1.0 in.
GODELTA/ 0, 0, -0.8
1.3 in.
GODELTA/ 0, 0, 0.8 P1 P2
GOTO/ P2
GODELTA/ 0, 0, -0.8 0.7 in.
P3
GODELTA/ 0, 0, 0.8
GOTO/ P3
GODELTA/ 0, 0, -0.8
GODELTA/ 0, 0, 0.8 Z = 0.0
GOTO/ PO
0.6 in.
43
The Machining Plan
TERMAC
The macro can be used any time in the APT program by
CALL macro name (, list of parameters)
44
The Machining Plan
P0 = (0,4,0.1)
PO = POINT/ 0, 4, 0.1
DELTA = MACRO/ DX, DY 1.0 in. 1.0 in.
GOTO/ DX, DY, ________ 1.3 in. P1 P2
GODELTA/ _______, ________, ________
GODELTA/ _______, ________, ________
TERMAC 0.7 in. P3
FROM/ PO
CALL DELTA/ DX = _______, DY = _______
CALL DELTA/ DX = _______, DY = _______
CALL DELTA/ DX = _______, DY = _______ Z = 0.0
GOTO/ PO
0.8 in.
45
The Machining Plan:
Contouring:
Drive surface: the surface that guide the side of the cutter.
Part surface: the surface on which the bottom or nose of
the tool is guided.
Check surface: a surface that stops the forward motion of
the tool in the execution of the current command i.e.
this surface checks the advance of the tool.
46
The Machining Plan
z
Drive surface Check surface
Direction of
cutter cutter motion
Part surface
47
The Machining Plan
CS CS CS
DS DS DS
TO ON PAST
48
The Machining Plan
TANTO :
A: GO/ TO, L1, TO, PL2, TANTO, C1
B: GO/ PAST, L1, TO, PL2, TANTO, C1
A (TO, L1)
Start point
C1
y
Check surface
L1 B (PAST, L1)
Drive surface
x 49
The Machining Plan
The tool has moved from a previous position to its current position.
The direction of next move is determined by one of the APT
motion as described below:
Motion commands:
GOLFT/ : Move left along the drive surface
GORGT/ : Move right along the drive surface
GOUP/ : Move up along the drive surface
GODOWN/ : Move down along the drive surface
GOFWD/ : Move forward from a tangent position
GOBACK/ : Move backward from a tangent position
50
The Machining Plan
B
A Start 51
Machining Specifications
52
Machining Specifications
FEDRAT/ : specifies the feed rate for moving the tool along the
part surface in inches per minute:
FEDRAT/ 4.5
SPINDL/ : gives the spindle rotation speed in revolutions per
minute:
SPINDL/ 850
TURRET/ : can be used to call a specific tool from an automatic
tool changer:
TURRET/ 11
53
Machining Specifications
54
Machining Specifications
Specified
Specified path
path
OUTTOL
INTOL
55
Machining Specifications
56
APT Contouring Example
PARTNO P1534
MACHIN/ MILL, 4 L4 P2
CLPRINT C2 L3
OUTTOL/ 0.0015 P3
P0 = POINT/ 0, 0, 1.1 P5
P1 = POINT/ 1, 1, 0.5
P2 = POINT/ 4, 3.5, 0.5 L5 L2
P3 = POINT/ 5.85, 2.85, 0.5 P4
PL1 = PLANE/ P1, P2, P3 y
PL2 = PLANE/ PARLEL, PL1, ZSMALL, 0.5
P1 = (1,1,0.5) C1
P4 = POINT/ 5, 1.85, 0.5
P5 = POINT/ 2, 2.5, 0.5 L1
x
C1 = CIRCLE/ CENTER, P4, RADIUS, 0.85
C2 = CIRCLE/ CENTER, P5, RADIUS, 1.0
L1 = LINE/ P1, RIGHT, TANTO, C1 Z = 0.5
L2 = LINE/ P3, LEFT, TANTO, C1
L3 = LINE/ P2, P3
Z=0
L4 = LINE/ P2, RIGHT, TANTO, C2
L5 = LINE/ P1, LEFT, TANTO, C2 z
MILLS = MACRO/ CUT, SSP, FRT, CLT
CUTTER/ CUT 57
x
APT Program
P0 = POINT/ 0, -2, 0
P1 = POINT/ 0.312, 0.312, 0
P2 = POINT/ 4, 1, 0
C1 = CIRCLE/ CENTER, P1, RADIUS, 0.312
C2 = CIRCLE/ CENTER, P2, RADIUS, 1
L2 = LINE/ RIGHT, TANTO, C2, RIGHT, TANTO, C1
L1 = LINE/ LEFT, TANTO, C2, LEFT, TANTO, C1
PL1 = PLANE/ P0, P1, P2
FROM/ P0
L2
GO/TO, L1, TO, PL1, TO, C2
P2
GOLFT/ L1, TANTO, C1
P1
GOFWD/ C1, PAST, L2 C1 C2
GOFWD/ L2, TANTO, C2
L1
GOFWD/ C2, PAST, L1
GOTO/ P0
P0
58
Geometric Statements of APT Program
P0 = POINT/ -1, -1,3
P1 = POINT/ 0, 0 y
P2 = POINT/ 3, 0
P3 = POINT/ 4, 0 C2
P4 = POINT/ 6.5, 5.5 L5
59
Motion Statements of APT Program
FROM/ P0 y
GO/ TO, L0, TO, PL1, TO, L6
C2
GODLTA/ 0,0,-1
L5 L4
GORGT/ L0, TO, C1 P4
C3
GORGT/ C1, TANTO, L1
GOFWD/ L1, TO, L2 L6 L3
GORGT/ L2, PAST, L3
GOLFT/ L3, TANTO, C2
L2
GOFWD/ C2, TANTO, L4 L1
P1 L0 P2 P3
GOFWD/ L4, PAST, C3
x
GOLFT/ C3, PAST, L5 C1
Assignment L4
P3
L5
L3 P2 P4 L3
L2 L6
P1 L1
P0
63
PARTNO SAMPL PART DRILLING OPERATION
MACHINE/DRILL,01
CLPRNT
UNITS/MM
REMARK Part geometry. Points are defined 10 mm above part surface.
PTARG = POINT/0,-50.0, 10.0
P5 = POINT /70.0,30.0,10.0
P6 = POTNT/120.0,30.0, 10.0
P7 = POINT/70.0,60.0, 10.0
REMARK Drill bit motion statement
FROM/PTARG
RAPID
GOTO/P5
SP1NDL/1000, CLW
FEDRAT/0.05, IPR
GODLTA/0,0, -25
GODLTA/0,0, 25
RAPID
GOTO/P6
SPINDL/1000, CLW
64
FEDRAT/0.05, IPR
GODLTA/0,0, -25
GODLTA/0,0, 25
RAPID
GOTO/P7
SPTNDL/l000, CLW
GODLTA/0,0,-25
GODLTA/0, 0, 25
RAPID
GOTO/PTARG
SPINDL/OFF
FINI
65
PARTNO SAMPLE PART MILLING OPERATION
MACHIN/MILLING,02
CLPRNT
UNITS/MM
CUTTER/20.0
REMARK Part geometry. Points and lines are defined 25 mm
below part top surface
PTARG = POlNT/0.-50.0,10.0
PI = POINT /0,0, -25
P2 = POINT/I60,0,-25
P3 = POINT /160,60,-25
P4 - POINT/35,90,-25
P8 = POINT/130.60,-25
Ll = LINE/PI, P2
L2 = LINE/P2, P3
C1 = CIRCLE/CENTER, P8. RADIUS, 30
L3 = LINE/P4,LEFT,TANTO,CI
L4 = LINE/P4, P1
PLl = PLANE/PI, P2. P4
REMARK Milling cutter motion statements.
FROM/PTARG
66
SPINDL/1000, CLW
FFDRAT /50, IPM
GO/TO.L1,TO,PLl, ON, L4
GORGT/Ll, PAST. L2
GOLFT/L2, TANTO, C1
GOFWD/C1, PAST, L3
GOFWD/L3, PAST, L4
GOLFT/L4, PAST, L1
RAPID
GOTO/PTARG
SPINDL/OFF
FINI
67