You are on page 1of 49

NUMERICAL CONTROL OF MACHINE TOOLS

MEE 4430
UNIT 4
Unit 4

• Programming languages, APT language


• Geometry statements
• Motion statements
• Auxiliary and Post Processor statements
• Part programming for simple parts

2
AUTOMATICALLY PROGRAMMED TOOLS (APT)
APT or Automatically Programmed Tool is a high-level
computer programming language used to generate
instructions for numerically controlled machine tools.
• Developed by Douglas T. Ross of the Servomechanisms Laboratory
at MIT in 1956.
• This early language was used widely in the 1970s and is still a
standard internationally.
• APT is used to program CNC machine tools to create complex
parts using a cutting tool moving in space.
• It is used to calculate a path that a tool must follow to generate a
3
desired form.
APT
There are four types of statements in the APT language.
• Geometry Statements:
– These define the geometric elements that comprise the work
part. They are also sometimes called definition statements.

• Motion Statements:
– These are used to describe the path taken by the cutting tool.

• Postprocessor Statements:
– These apply to specific machine tool and control system.
– They are used to specify feeds and speeds and to actuate other
features of the machine.

• Auxilliary Statements:
– These are miscellaneous statements and to identify the part,
tool, tolerances and so on.

4
APT
Geometry Statement:
A geometric statement in APT takes the following form:
symbol = geometric type/ descriptive data

The statements is made up of THREE sections.

•The first is the symbol used to identify the geometric element.


•A symbol can be any combination of six or fewer alphanumeric
character.
•The symbol cannot be APT vocabulary.
Example:
P2 = POINT/6.0,5.0,3.0 Defines a point with coordinates (6, 5, 3)
L1 = LINE/P1,P2 Creates a line between P1 and P2

C1 = CIRCLE/CENTER,P1,RADIUS,1.5 Creates a circle with P1 as center an radius of 1.5


5
APT
symbol = geometric type/ descriptive data
• The second section of the geometry statement is an APT vocabulary
word that identifies the type of geometry element.
– These could be POINT, LINE, PLANE and CIRCLE.

• The third section of the geometry statement comprises the


descriptive data that define the element precisely, completely and
uniquely.

• These data may include quantitative dimensional and positional data,


previously defined geometry element and other APT words.
P2 = POINT/6.0,5.0,3.0
• The statement is written as an equation, the symbol being equated to
the surface type. A slash separates the surface type from the
descriptive data. Commas are used to separate the words and numbers
in the descriptive data.
6
Geometry elements
POINT:
1. By the x, y and z coordinates
P1 = POINT/3.0, 1.5, 0.0
2. By the intersection of two lines L1 L2

P1 = POINT/L1, L2
P1

3. By the intersection of a line and a circle


P2 = POINT/YLARGE, INTOF, L3, C1 P2
P3 = POINT/XLARGE, INTOF, L3, C1 P3

C1 L3

7
C1 P4
4. By two intersecting circles C2
P4 = POINT/YLARGE, INTOF, CI, C2
P5 = POINT/YSMALL, INTOF, C1,C2 P5

5. By the center of a circle


P6 = POINT/CENTER, CI

C1 .

8
LINE
L1
1. By the coordinates of two points. P1 .
L1 = LINE/2,1,0,5,3,0 P2
2. By two points.
.
L1= LINE/ P1,P2
L1
C1
3. By a point and tangent to a circle.
L1 = LINE/P1, LEFT, TANTO, C1
L2 = LINE/P1, RIGHT, TANTO, C1 L2

P1
The descriptive words LEFT and RIGHT are
used by looking from the point toward the
Circle.

9
4. By a point and the angle of the line to the x-axis or another line.
L3 = LINE/ P1, LEFT, ATANGL, 20 L4

L4 = LINE/ P1, LEFT, ATANGL, 30, L3


L3
30
P1 20

5. By a point and being parallel to or perpendicular to another line.


L5 = LINE/P2, PARLEL, L3 L6 L5
L6 = LINE/P2, PERPTO, L3 L3
.
P2

10
CIRCLE

1. By the coordinates of the center and the radius.


C1 = CIRCLE/CENTER, 4.0,3.0,0.0, RADIUS, 2
C1 = CIRCLE/ 4.0, 3.0, 0.0, 2.0

2. By the center points and the radius.


C1 = CIRCLE/CENTER, P1, RADIUS, 2.0

3. By the center point and tangent to a line. L1


.P4

C1 = CIRCLE/CENTER, P1, TANTO, L1

4. By three points on the circumference. .P1 .P3


C1= CIRCLE / P2, P3, P4
C1
.
P2
11
PLANE:
.P1
1. By three points that do not lie on
.P3
the same straight line. PL1
.P2

PL1 = PLANE/P1, P2, P3


PL2
.P4
2. By a point and being parallel to
PL1
another plane.
PL2 = PLANE/P4,PARLEL, PL1
PL3
.P6
3. By two points and being
perpendicular to another plane. .P4 PL1

PL3 = PLANE/PERPTO, PL1, P4, P6

12
There are several ground rules that must be followed in formulating
an APT geometry statement:

1. The coordinate data must be specified in the order x, y, z. For


example the statement
P1 = POINT/5.0, 4.0,0.0 x=5; y=4; z=0

2. Any symbol used as a descriptive data must have been


previously defined.
For example, in the statement
P2 = POINT/INTOF, L1, L2
The two lines L1 and L2 must have been defined previously.

3. A symbol can be used to define only one geometry element. The


same symbol cannot be used to define two different elements.
For example, the following sequence would be incorrect:
P1 = POINT/1.0,1.0, 1.0
P1 = POINT/ 2.0, 3.0, 4.0
13
4. Only one symbol can be used to define any given element. For
example the following two statements in the same program
would render the program incorrect.
P1 = POINT/1.0,1.0, 1.0
P2 = POINT/ 1.0, 1.0, 1.0

5. Lines defined in APT are considered to be of infinite length in


both direction. Similarly, planes extend infinitely and circles
defined in APT are complete circles.

14
Problem: Write the geometry statement for the figure shown
below.

15
P0 = POINT/ 0, -1.0, 0
P1 = POINT/ 6.0, 1,125, 0
P2 = POINT/0, 0, 0
P3 = POINT/6.0, 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

16
APT
Motion Statement:
A motion statement in APT takes the following form:
Motion command/descriptive data
The statement consists of two sections separate by slash.
The first section is the basic motion command, which tells the tool
What to do?.
The second section comprised of descriptive data, which tells the
tool Where to go.

An example of the motion statement is:


GOTO/P1

The tool is commanded to go to point P1, which has been defined


previously in a preccding geometry statement.
17
• At the beginning of the motion statement, the tool must be given a
starting point.
• This point is likely to be the target point, the location where the
operator has positioned the tool at the start of the job.
• The part programmer keys into this starting position with the
following statement:
FROM/TARG

FROM is a APT vocabulary which indicates that this is the initial point
from which others will be referenced.
FROM statement occurs only at the starting of the motion sequence.
TARG is the symbol given to the starting point. Any other APT symbol
could be used to define the target point. Another way to make this
statement is: FROM/-2.0, -2.0, 0.0
Where the descriptive data in this case are the x, y, and z coordinates
of the target point.
18
POINT- TO- POINT MOTIONS
There are only two basic PTP motion commands.
GOTO, GODLTA
GOTO: GOTO statement instructs the tool to go to a particular point
location specified in the descriptive data.
For example:
GOTO/P1
GOTO/2.0, 7.0, 0.0
GODLTA: GODLTA command specifies an increment move for the
tool.
For example:
GODLTA/2.0, 7.0, 0.0
The statement instructs the tool to move from its present position 2
in the x-direction and 7 in the y- direction. The z coordinates
remains unchanged.
19
The GODLTA command is useful for drilling and related operations
The tool can be directed to a particular hole location with GOTO
statement.
Then the GODLTA command would be used to drill the hole.
GOTO/P2
GODLTA/0,0,-1.5
GODLTA/0,0.+1.5

20
Problem 2: Write the APT geometry and motion statement necessary
to perform drilling operation.

21
P1 = POINT/1.0, 2.0, 0
P2 = POINT/1.0, 1.0, 0
P3 = POINT/ 3.5, 1.5, 0
P0 = POINT/ -1.0, 3.0, 2.0
FROM/P0
GOTO/P1
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P2
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P3
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P0
22
CONTOUR MOTIONS
Contouring commands are
somewhat more complicated
because the tool positions must
be continuously controlled
throughout the move.

A motion statement requires


three surfaces to guide the tool
motion

Drive Surface: This is the surface


that guides the cutter.

23
Part Surface: This is a surface on
which the bottom of the cutter
rides. It controls the depth of the
machining operation.

Check Surface: This is the surface


that stops the movement of the
tool in its current direction.

24
• There are several ways in which the check surface can be used.
• This is determined by APT modifier words within the descriptive
data of the motion statement.
• The three main modifier words are:
TO, ON, PAST, TANTO

25
• The APT contour motion statement commands the cutter to
move along the drive and part surface and the movement ends
when the tool is at the check surface.
• There are six motion commands:
GOLFT, GOFWD, GOUP, GORGT, GOBACK, GODOWN

26
• There are six 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

27
• In commanding the cutter, the programmer must keep in mind
where it is coming from.

• As the tool reaches the new check surface, does the next
movement involve a right turn or an upward turn or what?

• The tool is directed accordingly by one of the six motion words


(GOLFT, GOFWD, GOUP, GORGT, GOBACK, GODOWN).

• In the use of these words, it is helpful for the programmer to


assume the viewpoint that the work piece remains stationary
and the tool is instructed to move relative to the work piece.

28
• To begin the sequence of motion commands, the FROM
statement, is used in the same manner as for PTP moves.
• The statement following the FROM statement defines the initial
drive surface, part surface, and check surface.
FROM/TARG
GO/TO, drive surface, TO, part surface, TO, check surface

FROM/TARG
GO/TO, PL1,TO, PL2 TO, PL3
29
FROM/TARG
GO/TO, PL1,TO, PL2 TO, PL3

The symbol TARG represents the target point where the operator
has set up the tool.

The GO command instructs the tool to move to the intersection of


the drive surface (FL1), the part surface (PL2), and the check surface
(PL3).
30
FROM/TARG
GO/TO, PL1,TO, PL2 TO, PL3

The periphery of the cutter is tangent to PL1 and PL3 and the
bottom of the cutter is touching PL2.

The cutter location is defined by use of the modifier word TO.

The three surfaces included in the GO statement must be specified


in the order: drive surface, part surface, and check surface.
31
What is the difference between GO/TO and GOTO command?
After initialization, the tool is directed along its path by one of the
six command words.
It is not necessary to repeat the symbol of the part surface after it
has been defined.
It is desired to move the tool along plane PL3.
FROM/TARG
GO/TO, PL1,TO, PL2 TO, PL3
GORGT/PL3, PAST, PL4
GORGT/L3, PAST, L4 32
FROM/TARG
GO/TO, PL1,TO, PL2 TO, PL3
GORGT/PL3, PAST, PL4
GORGT/L3, PAST, L4

We have substituted lines L3 and L4 for planes PL3 and PL4,


respectively. Plane PL2 has not been converted to a line. As the “part
surface” in the motion statement, it must maintain its status as a
plane parallel to the x- and y-axes.

When looking at a part drawing the sides of the part appear as lines.
On the actual part, they are three-dimensional surfaces.

However, it would be more convenient for the part programmer to


define these surfaces as lines and circles rather than planes and
33
cylinders.
Problem: Write the geometry and motion statement for the figure
shown below.

34
MOTION STATEMENT
FROM/P0
GO/TO, L1, TO, PL1, TO L3
GORGT/L1, TANTO, C1
GOFWD/C1, PAST, L2
GOFWD/L2, PAST, L3
GOLFT/L3, PAST, L1
GOTO/P0
GEOMETRY STATEMENT
P0 = POINT/ 0, -1.0, 0 How is cutter size accounted
P1 = POINT/ 6.0, 1,125, 0 for in the APT program?
P2 = POINT/0, 0, 0 How are feeds and speeds
P3 = POINT/6.0, 0,0 specified?
P4 = POINT/1.75, 4.5, 0
L1 = LINE/P2, P3 These and some other
C1 = CIRCLE/CENTER, P1, RADIUS, 1.125 questions are answered by
L2 = LINE/P4, LEFT, TANTO, C1 POSTPROCESSOR and
L3 = LINE/P2, P4 AUXILLIARY statements.
35
PL1 = PLANE/P2, P3, P4
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.

The general form of the postprocessor statement is:

POSTPROCESSOR COMMAND/descriptive data

In some commands, the descriptive data is omitted. Some examples


of the postprocessor statements are the following:

36
Postprocessor Statements

UNITS/ MM Indicate that the specified units used in the program


are inches or mm

COOLNT/ Turns coolant on, off, and actuate other coolant


options that may be available.
COOLANT/ON, COOLANT/OFF, COOLANT/FLOOD, COOLANT/MIST

END Used to stop the machine at the end of the section of


the program.
Can be used to change tools manually.
To continue program, a PROGRAM statement should
be used.

FEDRAT/ Used to specify feed rate.


FEDRAT/6.0 IPM
IPM or IPR indicates whether feed rate is units per
37
minute or units per revoFeed rate in mm/min or inches/min
Postprocessor Statements

MACHIN/ Used to specify the machine tool and to call the post
processor for the machine tool.

MACHIN/MILL, 1
The MILL identifies the machine tool type and 1 identifies the
particular machine and postprocessor.

SPINDL/ Gives the spindle rotation speed in revolutions per


minute:
SPINDL/ 850 CLW (CCLW)
SPINDL/OFF
TURRET/ Can be used to call a specific tool from an automatic
tool changer:
TURRET/ 11
Auxiliary statements
Auxiliary statements are used to identify the part program, specify
which postprocessor to use, insert remarks into the program.
AUXILIARY COMMAND/descriptive data

Some examples are following:


PARTNO identifies the part program and is inserted at the
start of the program.
CLPRINT indicates that a cutter location printout is desired.
CUTTER/ specifies a cutter diameter
CUTTER/ 20 diameter of cutter is 20 mm
FINI: Finish auxiliary statement. Must be the last word in
the APT program. Used to indicate the end of the
computer program. 39
OUTTOL/ Indicates the allowable tolerance between outside
of the curved surface and any straight line segments
used to approximate the curve.
INTOL/ Indicates the allowable tolerance between inside
of the curved surface and any straight line segments
used to approximate the curve.
INTOL/ 0.0025
OUTTOL/ 0.0025
41
THE MACRO STATEMENT IN APT

• The MACRO features is used where certain motion sequences


would be repeated several times within a program.

• The purpose in using a MACRO subroutine is to reduce the


total number of statements required in the APT program, thus
making the job of the part programmer easier and less time
consuming.

• The MACRO subroutine is defined by the following format:

symbol = MACRO/parameters definition (s)

42
symbol = MACRO/parameters definition (s)
• The rules for naming MACRO symbol are the same as for any
other APT symbol.
• The parameter definition (s) following the slash would identify
certain variables in the subroutines which might change each time
the subroutine was called in use.
• The very last statement in the set must be the APT word TERMAC.
This signifies the termination of the MACRO.
• To activate the MACRO subroutine within an APT program, the
following call statements would be used:

CALL/symbol, parameter (s) specification


• The symbol would be the name of the MACRO that is to be called.
• The parameter specification identifies the particular values of the
parameters that are to be used in this execution of the MACRO
subroutines. 43
P1 = POINT/1.0, 2.0, 0
Example
P2 = POINT/1.0, 1.0, 0
P3 = POINT/ 3.5, 1.5, 0
P0 = POINT/ -1.0, 3.0, 2.0
FROM/P0
GOTO/P1
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P2
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P3
GODLTA/0, 0, -1.0
GODLAT/0, 0, +1.0
GOTO/P0
44
P1 = POINT/1.0, 2.0, 0
P2 = POINT/1.0, 1.0, 0
P3 = POINT/ 3.5, 1.5, 0
P0 = POINT/ -1.0, 3.0, 2.0
FROM/P0
GOTO/P1
GODLTA/0, 0, -1.0
DRILL = MACRO/PX
GODLAT/0, 0, +1.0 GOTO/PX
GODLTA/0, 0, -1.0
GOTO/P2 GODLAT/0, 0, +1.0
GODLTA/0, 0, -1.0 TERMAC

GODLAT/0, 0, +1.0 FROM/P0


GOTO/P3 CALL/DRILL, PX = P1
CALL/DRILL, PX = P2
GODLTA/0, 0, -1.0 CALL/DRILL, PX = P3
GODLAT/0, 0, +1.0 GOTO/P0
GOTO/P0 45
Exercise 1

L2
P2
P1
C1 C2
L1

P0
Exercise 2

C2
L5
P4
C3

L6 L3

L2
P1 L0 L1
P2 P3
x
C1
P0
Exercise 3

P3

L4 L5

P2 P4
L3 L3

L2 L6

P1 L1

P0
END OF 4th UNIT

49

You might also like