Professional Documents
Culture Documents
APT Notes
APT Notes
Computer assisted programming methods are much faster and more reliable than
manual programming techniques. There are a variety of forms of computer assisted
programming. The common feature of these programs is that the part and machining
paths are not defined directly with G-code but through English-like statements or through
interactive graphic instructions.
APT uses English-like language statements to define part shape and tool motion
as well as machine tool dependent data, such as feedrates and spindle speeds. This data is
contained in an APT part-program. An APT processor program is used to read these
statements, interpret the meanings, and perform all the necessary calculations in order to
generate a series of cutter location points that define the cutter path. The APT processor
is a computer program which runs on a mainframe computer, possibly at a central site
with time-sharing facilities. The generalized APT output is converted to the particular
format G-code required by the CNC machine using a postprocessor program. Although
G-codes are fairly well standardized, differences do exist between machine suppliers and
CNC machines can be supplied with a variety of subsets of available codes.
2. Motion Statements: which describe the tool path in relation to the part geometry
The statement is made up of three sections. The first is the symbol use to identify the
geometric element. Normally the alphabet “P” is used for defining a Point, “C” for
Circle, “L” for Line and “Pl” for Plane.
The second section of the geometry statement is an APT vocabulary word that
identifies the type of geometry element. e.g. POINT, LINE, CIRCLE, PLANE, etc.
The third section of the geometry statement is the descriptive data that define the
element precisely, completely and uniquely.
GENERAL RULES:
Every point definition will have the same basic format:
Symbolic name = POINT / definition of a point
When a point has been defined it will have coordinates in all three axes.
If there is no allowance in a definition for quoting the z coordinate this will
automatically be made zero
P1 = POINT / 2,2,2
DEFINITION OF POINT-2: ( Intersection of two previously defined lines )
P2 = POINT / INTOF,L1,L2
P2 = POINT / CENTER, C1
DEFINITION OF POINT-7: ( On a previously defied Line and a known X or Y
dimension from datum )
GENERAL RULES:
Every line definition will have the same basic format:
Symbolic name = LINE / definition of a line
L1 = LINE / P1, P2
The RIGHT or LEFT modifiers are applied by looking from the point to the
circle and deciding whether the line will pass to the right or left of the circle.
DEFINITION OF LINE-3: ( Tangent to two previously defined circles )
The RIGHT & LEFT modifiers are applied looking from the first circle quoted to the
second
GENERAL RULES:
Every circle definition will have the same basic format:
Symbolic name = CIRCLE / definition of a circle
C1 = CIRCLE / X,Y,R
GENERAL RULES:
Every plane definition will have the same basic format:
Symbolic name = PLANE / definition of a plane
A plane is used to construct a surface of constant “Z” level to which the cutter
should be referenced when machining in the XY plane
e.g. GOTO / P1
At the beginning of the motion statements tool must be given a starting point
FROM / P0
Or FROM / -2, -2, 0
The FROM is an APT vocabulary word which indicates that this is the initial
point from which others will be referenced. The FROM statement occurs only once at
the start of the motion sequence.
GOTO:
GODLTA:
Drill three holes of 0.5” diameter at P1, P2, P3. The part is 0.5” thick.
P1=POINT/1,2,0.5
P2=POINT/1,1,0.5
P3=POINT/3.5,1.5,0.5
P0=POINT/-1,3,2
FROM/P0
GOTO/P1
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P2
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P3
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P0
b) CONTOURING MOTION:
The drive surface guides the side of the cutter, the part surface defines the
position of the bottom of the cutter, and the check surface defines the limit of current
tool motion. The part surface may or may not be an actual surface of the workpart.
Modifier words, such as TO, ON, PAST or TANTO, are used to govern the position of
the tool in relation to the check surface.
Motion statements, GOLFT (go to the left), GOFWD (go forward) and
GRGT(go to the right), are also used to control the cutter motion.
EXAMPLE OF CONTOURING MOTION STATEMENTS IN APT
FROM/P0
GO/TO,L1,TO,PL1,TO,L5
GORGT/L1,PAST,L2
GOLFT/L2,TO,L3
GORGT/L3,TANTO,C1
GOFWD,C1,PAST,L4
GOFWD/L4,PAST,L5
GOLFT/L5,PAST,L1
GOTO/P0
EXAMPLE OF CONTOURING MOTION STATEMENTS IN APT
FROM/P0
GO/TO,L1,TO,PL1,ON,L8
GORGT/L1,PAST,L2
GOLFT/L2,TANTO,C1
GOFWD/C1,PAST,L3
GOFWD/L3,TANTO,C2
GOFWD/C2,TO,L4
GOFWD/L4,TANTO,C3
GOFWD/C3,PAST,L5
GOFWD/L5,TANTO,C4
GOFWD/C4,PAST,L6
GOFWD/L6,TANTO,C5
GOFWD/C5,TO,L7
GOFWD/L7,PAST,L8
GOLFT/L8,PAST,L1
3. Post Processor Statements
Statements which specify machine tool related functions, such as those covered by
F-, S-, T-, and M-codes, are defined in the postprocessor statements. Some of the
common post processor statements are:
RAPID Used for rapid movement of the cutting tool. Applied for all
subsequent motion commands until superseaded by a FEDRAT
spec.
Auxiliary statements are used for cutter-size definition, part identification, etc. Some
of the common auxiliary statements are:
CLPRNT Used to obtain a computer print out of the cutter location sequence
PARTNO Used at the beginning of the APT part program to identify the
program
APT part programs usually list the part and the postprocessor reference number
followed by the program statements as follows:
PARTNO___
MACHIN/___
Geometry statements
Motion statements and machine tool commands
FINI
EXAMPLE 1:
Write a complete program in APT for machining the profile shown in figure below. All dimensions are in
inches. The feedrate is 30 inches/min, spindle speed is 500 rpm clockwise, post processor statement is
MACHIN/MILL5,10 Cutter diameter is 0.5 inches. Assume the z-coordinate for the whole profile to be 0. The
starting point of the tool is P0 (-10,-10,0). Machine the profile in such a way that the cutter is always on the
right side of the workpiece.
PART NO EXAMPLE 1
MACHIN/MILL5,10
CLPRINT
UNITS/INCHES
CUTTER/0.5
P0=POINT/0,-1,0
P1=POINT/6,1.125,0
P2=POINT/0,0,0
P3=POINT/6,0,0
P4=POINT/1.75,4.5,0
L1=LINE/P2,P3
C1=CIRCLE/CENTER,P1,RADIUS,1.125
L2=LINE/P4,LEFT,TANTO,C1
L3=LINE/P2,P4
PL1=PLANE/P2,P3,P4
SPINDL/500,CLW
FEDRAT/30,IPM
COOLNT/ON
FROM/P0
GO/TO,L1,TO,PL1,ON,L3
GORGT/L1,TANTO,C1
GOFWD/C1,PAST,L2
GOFWD/L2,PAST,L3
GOLFT/L3,PAST,L1
RAPID
GOTO/P0
COOLNT/OFF
SPINDL/OFF
FINI
EXAMPLE 2:
Write a complete program in APT for machining the profile shown in figure below. All dimensions are in mm.
The feedrate is 30 mm/min, spindle speed is 500 rpm counter-clockwise, post processor statement is
MACHIN/MILL20,10 Cutter diameter is 5 mm. Assume the z-coordinate for the whole profile to be 0. The
starting point of the tool is P0 (-10,-10,0). Machine the profile in such a way that the cutter is always on the
right side of the workpiece.
Defining Geometry Elements
APT PROGRAM
PART NO EXAMPLE 2
MACHIN/MILL20,10
CLPRINT
UNITS/MM
CUTTER/5
P0=POINT/0,0,0
P1=POINT/80,0,0
P2=POINT/0,40,0
P3=POINT/60,0,0
P4=POINT/40,40,0
P5=POINT/-10,-10,0
L1=LINE/P0,P3
P6=POINT/80,40,0
L2=LINE/P1,P6
L3=LINE/P2,P6
L4=LINE/P0,P2
L5=LINE/P3,PARLEL,L2
L6=LINE/P4,PARLEL,L4
C1=CIRCLE/CENTER,P1,RADIUS,20
C2=CIRCLE/CENTER,P2,RADIUS,40
PL1=PLANE/P0,P3,P6
SPINDL/500,CCLW
FEDRAT/30,IPM
COOLNT/ON
FROM/P5
GO/TO,L1,TO,PL1,TO,L4
GORGT/L1,PAST,L5
GOLFT/L5,TANTO,C1
GOFWD/C1,PAST,L2
GOLFT/L2,PAST,L3
GOLFT/L3,PAST,L6
GOLFT/L6,TANTO,C2
GOFWD/C2,PAST,L4
RAPID
GOTO/P5
COOLNT/OFF
SPINDL/OFF
FINI
EXAMPLE 3:
Write a complete program in APT for machining the profile shown in figure below. All dimensions are in
inches. The feedrate is 3 in/min, spindle speed is 500 rev/min clockwise, Post processor statement is
MACHIN/MILL6,01. The Cutter diameter is 5 inches. Assume the z-coordinate for the whole profile to be 0.
The starting point of the tool is indicated by P0 (10,-20,0). The direction of cutting must be such that the tool is
always on the right side of the workpiece.
Defining Geometry Elements
APT PROGRAM
PART NO EXAMPLE 3
MACHIN/MILL6,01
CLPRINT
UNITS/INCHES
CUTTER/5
P0=POINT/60,-20,0
P1=POINT/20,30,0
P2=POINT/-30,30,0
P3=POINT/-30,-30,0
P4=POINT/20,-30,0
P5=POINT/50,-10,0
P6=POINT/50,10,0
P7=POINT/0,30,0
P8=POINT/-30,0,0
C1=CIRCLE/CENTER,P1,RADIUS,20
C2=CIRCLE/CENTER,P2,RADIUS,30
C3=CIRCLE/CENTER,P3,RADIUS,30
C4=CIRCLE/CENTER,P4,RADIUS,20
L1=LINE/P5,P6
L2=LINE/P6,LEFT,TANTO,C1
L3=LINE/ P5,RIGHT,TANTO,C4
L4=LINE/P1,P2
L5=LINE/P7,PERPTO,L4
L6=LINE/P2,P3
L7=LINE/P8,PERPTO,L6
L8=LINE/P3,P4
PL1=PLANE/P1,P2,P3
SPINDL/500,CLW
FEDRAT/3,IPM
COOLNT/ON
FROM/P0
GO/TO,L1,TO,PL1,TO,L3
GORGT/L1,PAST,L2
GOLFT/L2,TANTO,C1
GOFWD/C1,PAST,L4
GOLFT/L4,PAST,L5
GOLFT/L5,TANTO,C2
GOFWD/C2,PAST,L6
GOLFT/L6,PAST,L7
GOLFT/L7,TANTO,C3
GOFWD/C3,PAST,L8
GOLFT/L8,PAST,L5
GOLFT/L5,TANTO,C4
GOFWD/C4,TO,L3
GOFWD/L3,PAST,L1
RAPID
GOTO/P0
COOLNT/OFF
SPINDL/OFF
FINI