Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 75

Module 2

APT PROGRAMMING
(Automatically Programmed Tool)
CNC PROGRAMING
The different types of NC programming are:
1. Manual Part Programming (G-Code)
2. Computer Assisted Part Programming (English like statements)
3. Part Programming Using CAD/CAM
1. APT part programme –written in APT language (English statement)
2. APT programme processor- converts into cutter location file (CLDATA)
3. APT post processor-produces NC files from cutter location data

A postprocessor is a program that reads a CL file and produces a CNC program


for a specific machine tool
In APT part programming languages, the two main tasks of the programmer are:
1. Define the part geometry
2. Specify the tool path and Operation Sequence
Other functions in APT
a. Specifying the speed and feed rate
b. Specifying cutter size and tool offset
c. Specifying the tolerance
d. Naming the program
e. Identifying the machine tool
Four basic types of statements in the APT language

1. Geometry statements, also called definition statements; are used


to define the geometry elements that comprise the part.

2. Motion commands; are used to specify the tool path.

3. Postprocessor statements; control the machine tool operation, for


example, to specify speeds and feeds, set tolerance values for
circular interpolation, and actuate other capabilities of the
machine tool.

4. Auxiliary statements; a group of miscellaneous statements used


to name the part program, insert comments in the program and
accomplish similar functions.
Geometry statements

Points: Specification of a point can be accomplished by the following:


 Designating its x-, y-, and z-coordinates;
P1 = POINT/15.0, 10.0, 25.0

 As the intersection of two intersecting lines;


P2 = POINT/INTOF, L1, L2
L1 and L2 are two previously defined lines.
Lines: A line in APT is considered to be of infinite length in both
directions. Specification of a line can be accomplished by the following:
 Two points through which it passes;
L1 = LINE/P3, P4
P3 and P4 are two previously defined points.
 Passes through point (P5) and parallel to another line (L3) that
has been previously defined;
L2 = LINE/P5, PARLEL, L3
Planes: In APT, a plane extends indefinitely. A plane can be defined by the
following:
 Three points through which It passes;
PL1 = PLANE/P1, P2, P3
P1, P2 and P3 must be non-collinear.
 Passes through point (P2) and parallel to another plane (PL1) that has been
previously defined;
PL2 = PLANE/P2, PARLEL, PL1
Circles: In APT, a circle is considered to be a cylindrical surface that is perpendicular
to the x-y plane and extends to infinity in the z-direction. A circle can be defined by
the following:
 Center and radius;
C1 = CIRCLE/CENTER, P1, RADIUS, 25.0
 Three points through which it passes;
C2 = CIRCLE/P4, P5, P6
The three points must not be collinear.
MOTION COMMANDS

MOTION COMMAND/descriptive data


FROM/STARTPT
FROM/-20.0, -20.0, 0

Point-to-point motions
There are two commands; GOTO

GOTO/P2

GOTO/25.0, 40.0,0

GODLTA/50.0, 120.0, 40.0


The GODLTA command specifies an incremental move for the tool
Contouring motions
Contouring motion statement ---GO/TO
(defines the initial drive, part and check surfaces)

more complicated than PTP commands - because the tool’s position must be
continuously controlled throughout the move.
Four APT modifier words of the motion statement words are
TO, ON, PAST, and TANTO
Note that GO/TO is not the same as the GOTO command. GOTO is used only for PTP
motions.

GO/ON,
GO/TO,
GO/PAST
GO/TANTO
GOLFT commands the tool to make a left turn relative to the last move
GORGT commands the tool to make a right turn relative to the last move
GOFWD commands the tool to move forward relative to the last move
GOBACK commands the tool to move in reverse direction relative to last move
GOUP commands the tool to move upward relative to the last move
GODOWN commands the tool to move down relative to the last move
Postprocessor statements
Postprocessor statements control the operation of the machine tool and play a
supporting role in generating the tool path. Such statements are used to define cutter
size, specify speeds and feeds, turn coolant flow on and off, and control other features
of the m/c tool. command/descriptive data
Postprocessor
1. UNITS/MM indicates that the specified units in the program are INCHES or MM.
2. INTOL/0.02 specifies inward tolerance for circular interpolation
3. SPINDL/1000, CLW specifies spindle rotation speed in revolutions per minute. Either
CLW (clockwise) or CCLW (counter-clockwise) can be specified. (SPINDL/OFF)
4. CUTTER/20 defines cutter diameter for tool path offset calculation
5. DELAY/30 temporarily stops the machine tool for a period specified in seconds.
6. FEDRAT/40,IPM specifies feed rate in in/min as specifies in UNITS statements. RAPID
engage high feed rate for next moves.
7. COOLNT/FLOOD turns fluid one (COOLNT/MIST)
8. (COOLNT/OFF)
9. LOADTL/01 used with automatic tool changing.
Postprocessor command/descriptive data
In some commands, the descriptive data is omitted. Some examples
of the postprocessor statements are the following:
1. UNITS/MM indicates that the specified units in the program are
INCHES or MM.
2. INTOL/0.02 specifies inward tolerance for circular interpolation
3. SPINDL/1000, CLW specifies spindle rotation speed in revolutions per
minute. Either CLW (clockwise) or CCLW (counter-clockwise) can be
specified. (SPINDL/OFF)
4. CUTTER/20 defines cutter diameter for tool path offset calculation
5. DELAY/30 temporarily stops the machine tool for a period specified in
seconds.
6. FEDRAT/40,IPM specifies feed rate in mm/min or in/min as specifies
in UNITS statements. (FEDRAT/4,IPR)
7. RAPID engage high feed rate for next moves.
8. COOLNT/FLOOD turns fluid one (COOLNT/MIST)
9. (COOLNT/OFF)
10. LOADTL/01 used with automatic tool changing
Auxiliary statements
Auxiliary statements are used to identify the part program,
specify which postprocessor to use, insert remarks into the
program, and so on. Auxiliary statements have no effect on the
generation of tool path.
1. PARTNO is the first statement in an APT program, used to
identify the program;
2. REMARK is used to insert explanatory comments into the
program that are not interpreted or processed by the APT
processor.
3. FINI indicates the end of an APT program.
GO/TO/L2,
GORGT/L2, PAST, L3
GORGT/L3, TO, L4,
GOLFT/L4, TANTO, and C1
GOFWD/C1, TANTO, and L5.

The cutter is moving along a drive surface, L1, toward a check surface, and stops
to the line L2.
When it arrives at L2, the cutter will make a right turn and move along L2 and past the
new check surface L3. Note that L2 changes from a check surface to a drive surface the
moment the cutter begins to move along it.
The cutter is moving to the right, it makes a left turn if one is looking in the direction of
travel of the cutter. In writing the motion statements, the part programmers must imagine
they are steering the cutter. The drive surface now becomes L4 and the check surface, C1
This movement could continue indefinitely, with the cutter being guided by the drive,
part, and check surfaces
PARTNO SIMPLE MILLING REMARK Defining Motion
MACHIN/CNC1 Statements
UNITS/MM CUTTER/10
REMARK/ Defining Geometry SPINDL/350
STARTPT=POINT/0, 0, -20 FEDRAT/30
P1=POINT/50, 50, -20 COOLANT/ON
P2=POINT/100, 50, -20 FROM/STARTPT
P3=POINT/100, 100, -20 GO/TO L1, TO, PL1, TO, L3
P4=POINT/50, 150, -20 GORGT/L1, TANTO, C1
L1=LINE/P1, P2 GOFWD/C1, TANTO, L2
C1=CIRCLE/P3, RADIUS, 50 GOFWD/L2, PAST, L3
L2=LINE/P4, LEFT, TANTO, C1 GOLFT/L3, PAST, L1
L3=LINE/P1, P4 GOTO/STARTPT
PL1=PLANE/P1, P2, P3 COOLNT/OFF
FINI
REMARK Motion Statements
SPINDL/600, CLW Spindle turned on to 600rpm clockwise direction
FEDRAT/6 feed rate set to 6 inches
per minute
COOLNT/ON coolant is turned on
FROM/STARTPT Tool is called from its starting location
GO/TO, L1, TO, PL1, TO, L3 Initializing contouring motion
GORGT/L1, TANTO, C1 Tool moves along L1 till tangent to C1
GOFWD/C1, PAST, L2 Tool moves along C1 till goes past L2
GOFWD/L2, PAST, L3 Tool moves along L2 till it crosses L3
GOLFT/L3, PAST, L1 Tool moves along L3 till it crosses L1
RAPID Tool is set to rapid mode
GOTO/STARTPT Tool is taken back to starting location
COOLNT/OFF Coolant is turned off
SPINDL/OFF Spindle is turned off
FINI End of program
DRIVE SURFACE –PART SURFACE –CHECK SURFACE
The two APT descriptive words are used to identify the center
and radius. The orientation of the circle perhaps seems
undefined.
• L1 = LINE/P0, P1 specifies a line by two points, previously defined.

• L1 = LINE/1.0, 1.2, 1.3, 2.0, 2.1, 2.3 specifies a line by two points, given as
explicit coordinates.

• L2 = LINE/P2, PARLEL, L1 specifies a line through point P2 and parallel to


line L1.

• L3 = LINE/P1, RIGHT, TANTO, C1 specifies a line through point P1 and


tangent to circle C1 on the right side of the center point.

• L4 = LINE/P1, ATANGL, 45, L1 specifies a line through point P1 at an angle of


45o to line L1.
.
A Absolute or incremental position of A axis (rotational axis around X axis)

B Absolute or incremental position of B axis (rotational axis around Y axis)


C Absolute or incremental position of C axis (rotational axis around Z axis)
D Defines diameter or radial offset used for cutter compensation. D is used for depth of cut
on lathes. It is used for aperture selection and commands on photo plotters.
E Precision feed rate for threading on lathes
F Defines feed rate
G Address for preparatory commands
H Defines tool length offset;
Incremental axis corresponding to C axis (e.g., on a turn-mill)
I Defines arc center in X axis for G02 or G03 arc commands.
Also used as a parameter within some fixed cycles.
J Defines arc center in Y axis for G02 or G03 arc commands.
Also used as a parameter within some fixed cycles.
K Defines arc center in Z axis for G02 or G03 arc commands.
Also used as a parameter within some fixed cycles, equal to L address.
L Fixed cycle loop count;
Specification of what register to edit using G10
M Miscellaneous function
N Line (block) number in program;
System parameter number to change using G10
O Program name
P Serves as parameter address for various G and M codes
Q Peck increment in canned cycles
R Defines size of arc radius, or defines retract height in milling canned cycles
S Defines speed, either spindle speed or surface speed depending on mode
T Tool selection
U Incremental axis corresponding to X axis (typically only lathe group A controls)
Also defines dwell time on some machines (instead of "P" or "X").
V Incremental axis corresponding to Y axis
W Incremental axis corresponding to Z axis (typically only lathe group A controls)
X Absolute or incremental position of X axis.
Also defines dwell time on some machines (instead of "P" or "U").
Y Absolute or incremental position of Y axis
Z Absolute or incremental position of Z axis
CAD Aided part programming
STARTPT
PARTNOSAMPLEMILLING Labels the program as
milling operation
MACNIN/MILL,01 Milling machine no:1 is selected
UNITS/MM Units is set to millimeters
REMARK Geometry Definition
STARTPT=POINT/-1, -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 Geometry: - points, lines and
circles defined C1=CIRCLE/CENTER, P1, RADIUS, 1.25
L2=LINE/P4, LEFT, TANTO, C1
L3=LINE/P2, P4
PL1=PLANE/P2, P3, P4 Plane define to denote
part surface (cut depth)

You might also like