Está en la página 1de 8

٢٧/٠٢/١٤٣٥

CHAPTER FOUR
CAD/CAM
Computer Numerical
Control (CNC)
Dr. Ibrahim Al-Naimi

CNC Part Programming Computer-Assisted Part Programming


APT: Automatically Programmed Tooling.
1- Manual Part Programming (G-Code) • APT is a three-dimensional NC programming
2- Computer Assisted Part Programming (APT) system.
3- Part Programming Using CAD/CAM • 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.

Computer-Assisted Part Programming Computer-Assisted Part Programming


• To program in APT, the part geometry must first
• In computer-assisted part programming (APT), the
be defined. Then the tool is directed to various point
machining instructions are written in English-like
locations and along surfaces of the workpart to
statements that are subsequently translated by the
accomplish the required machining operations.
computer into the low-level machine code that can be
interpreted and executed by the machine tool
controller. • The viewpoint of the programmer is that the workpiece
• When using one of the part programming languages, remains stationary, and the tool is instructed to move
the two main tasks of the programmer are: relative to the part.
(1) Defining the geometry of the workpart.
(2) Specifying the tool path and operation • To complete the program, speeds and feeds must be
sequence. specified, tools must be called, tolerances must be
given for circular interpolation, and so forth.

١
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming

There are four basic types of statements in the APT • The statements are constructed of APT vocabulary
language: words, symbols, and numbers, all arranged using
1. Geometry statements, also called definition statements, appropriate punctuation.
are used to define the geometry elements that comprise the
• APT vocabulary words consist of six or fewer
part.
characters.
2. Motion commands are used to specify the tool path.
3. Postprocessor statements control the machine tool • Most APT statements include a slash (/) as part of the
operation, for example, to specify speeds and feeds, set punctuation.
tolerance values for circular interpolation, and actuate other • APT vocabulary words that immediately precede the
capabilities of the machine tool. slash are called major words, whereas those that
4. Auxiliary statements, a group of miscellaneous statements follow the slash are called minor words.
used to name the part program, insert comments in the
program and accomplish similar functions.

Computer-Assisted Part Programming


Computer-Assisted Part Programming
Geometry Statements Geometry Statements

Lines
SYMBOL = GEOMETRY TYPE/DESCRIPTIVE DATA • A line defined in APT is considered to be infinite length in
both directions. Also, APT treats a line as a vertical plane
Points that is perpendicular to the x-y plane.
P1 = POINT/20.0,40.0,60.0
L3 = LINE/P3,P4
P2 = POINT/INTOF,L1,L2
L4 = LINE/P5,PARLEL,L3

• Commas are used to separate the words and


numerical values in the descriptive data.

Computer-Assisted Part Programming


Computer-Assisted Part Programming
Geometry Statements Geometry Statements
Circles
• In APT, a circle is considered to be a cylindrical surface that Rules for formulating APT geometry statements:
is perpendicular to the x-y plane and extends to infinity in the 1. Coordinate data must be specified in the order x, then y,
z-direction.
then z.
C1 = CIRCLE/CENTER,P1,RADIUS,25.0
C2 = CIRCLE/P4,P5,P6 2. Any symbols used as descriptive data must have been
previously defined.
Planes 3. A symbol can be used to define only one geometry
• In APT, a plane extends indefinitely. element.
PL1 = PLANE/P1,P2,P3 4. Only one symbol can be used to define any given element.
PL2 = PLANE/P2,PARLEL,PL1

٢
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Example Part Geometry Using APT
Example Part Geometry Using APT

Computer-Assisted Part Programming Computer-Assisted Part Programming


Example Part Geometry Using APT
P1 = POINT/0,0,0
Motion Commands
P2 = POINT/160.0,0,0 The format of an APT motion command is:
P3 = POINT/160.0,60.0,0
P4 = POINT/35.0,90.0,0
P5 = POINT/70.0,30.0,0 MOTION COMMAND/DESCRIPTIVE DATA
P6 = POINT/120.0,30.0,0
Example: GOTO/P1
P7 = POINT/70.0,60.0,0
P8 = POINT/130.0,60.0,0 • The statement consists of two sections
L1 = LINE/P1,P2 separated by a slash. The first section is the
L2 = LINE/P2,P3 basic command that indicates what move
C1 = CIRCLE/CENTER,P8,RADIUS,30.0
L3 = LINE/P4,PARLEL,L1
the tool should make. The descriptive data
L4 = LINE/P4,P1 following the slash tell the tool where to go.

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands Motion Commands
• At the beginning of the sequence of motion statements, the tool Point-to-point motions
must be given a starting point. This is likely to be the target
point, the location where the operator has positioned the tool at There are only two commands: GOTO and GODLTA.
the start of the job. The part programmer keys into this starting • The GOTO statement instructs the tool to go to a particular point location
position with the following statement: specified in the descriptive data.
• FROM/PTARG Examples:
GOTO/P2
• Where FROM is an APT vocabulary word indicating that this is GOTO/25.0,40.0,0
the initial point; and PTARG is the symbol assigned to the • In the first command, P2 is the destination of the tool point. In the second
starting point. Another way to make this statement is the command, the tool has been instructed to go to the location whose
following: coordinates are x=25.0, y=40.0, and z=0.
• FROM/-20.0,-20.0,0 • The GODLTA command specifies an incremental move for the tool. To
• The FROM statement occurs only at the start of the motion illustrate, the following statement instructs the tool to move from its present
position by a distance of 50.0mm in the x-direction, 120.0mm in the y-
sequence. direction, and 40.0mm in the z-direction:
GODLTA/50.0,120.0,40.0

٣
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands Motion Commands
Contouring Motion Commands
Point-to-point motions
• The tool's position must be continuously controlled throughout
the move. The tool is directed along two intersecting
•The GODLTA statement is useful in drilling and related surfaces until it reaches a third surface, as shown in the
machining operations. The tool can be directed to go to a following Figure.
given hole location; then the GODLTA command can be used • These three surfaces have specific names in APT; they are:
to drill the hole, as in the following sequence:
1.Drive surface. This surface guides the side of the cutter.
2.Part surface. This is the surface on which the bottom or nose
GOTO/P2 of the tool is guided.
GODLTA/0,0,-50.0 3.Check surface. This is the surface that stops the forward
GODLTA/0,0,50.0 motion of the tool in the execution of the current command.
One might say that this surface "checks" the advance of the
tool.

Computer-Assisted Part Programming


Computer-Assisted Part Programming
Motion Commands
Motion Commands
There are several ways in which the check
surface can be used. This is determined by
using any of four APT modifier words in the
descriptive data of the motion statement. The
four modifier words are TO, ON, PAST, and
TANTO.
The surfaces in APT contouring motions that guide the cutting tool

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands Motion Commands
The modifier word TANTO is used when the drive
surface is tangent to a circular check surface.

Use of APT modifier words in motion statements: (a) TO moves the


tool into initial contact with the check surface; (b) ON positions
the tool center on the check surface; (c) PAST moves the tool Use of the APT modifier word TANTO. TANTO moves the
just beyond the check surface. tool to the point of tangency between two surfaces, at
least one of which is a circular surface.

٤
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands
Motion Commands
• In writing a motion statement, the part programmer
must keep in mind the direction from which the tool
is coming in the preceding motion.
• The programmer must pretend to be riding on
the top of the tool, as if driving a car.
• After the tool reaches the check surface in the
preceding move, does the next move involve a right
turn or left turn or what? The answer to this question
is determined by one of the following six motion Use of the APT motion words. The tool has moved from a previous
position to its present position. The direction of the next move
words, whose interpretations are illustrated in the is determined by one of the APT motion words GOLFT, GORGT,
following figure: GOFWD, GOBACK, GOUP, or GODOWN.

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands
To begin the sequence of motion commands, the FROM
Motion Commands
statement is used. The statement following the FROM
command defines the initial drive surface, part surface, and
check surface. With reference to the following figure, the
sequence takes the following form:
FROM/PTARG
GO/TO,PL1,TO,PL2,TO,PL3

• The symbol PTARG 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 (PL1), the
part surface (PL2), and the check surface (PL3). Because the
modifier word TO has been used for each of the three surfaces,
the circumference of the cutter is tangent to PL1 and PL3, and
the bottom of the cutter is on PL2. The three surfaces included
in the GO statement must be specified in the order: (1) drive
surface, (2) part surface, and (3) check surface. Initialization of APT contouring motion sequence.

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands Motion Commands
• After initialization, the tool is directed along its path by one of
Note that GO/TO is not the same as the GOTO the six motion command words. It is not necessary to
redefine the part surface in every motion command after it
command. GOTO is used only for PTP has been initially defined as long as it remains the same in
motions. The GO/ command is used to subsequent commands. In the preceding motion command:
initialize a sequence of contouring motions • GO/TO,PL1,TO,PL2,TO,PL3
and may take alternatives forms such as
GO/ON,GO/TO, or GO/PAST. • The cutter has been directed from PTARG to the intersection
of surfaces PL1, PL2, and PL3. Suppose it is now desired to
move the tool along plane PL3, with PL2 remaining as the
part surface. The following command would accomplish this
motion:

• GORGT/PL3,PAST,PL4

٥
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Motion Commands
Motion Commands
Note that PL2 is not mentioned in this new
The planes around the part outline can be
command. PL3, which was the check surface
replaced by lines, and the APT commands can
in the preceding command is now the drive
be replaced by the following:
surface in the new command. And the new
check surface is PL4. Although the part FROM/PTARG
surface may remain the same throughout the GO/TO,L1,TO,PL2,TO,L3
motion sequence, the drive surface and check GORGT/L3,PAST,L4
surface must be redefined in each new
contouring motion command.

Computer-Assisted Part Programming Computer-Assisted Part Programming


Example APT Contouring Motion Commands Example APT Contouring Motion Commands

Computer-Assisted Part Programming Computer-Assisted Part Programming


Example APT Contouring Motion
Commands Example APT Contouring Motion
• Let us write the APT motion commands to profile Commands
mill the outside edges of our sample workpart. FROM/PTARG
•The tool begins its motion sequence from a target GO/TO,L1,TO,PL2,ON,L4
point PTARG located at x=0, y=-50mm and z=10mm.
GORGT/L1,PAST,L2
• We also assume that "part surface" PL2 has been
defined as a plane parallel to the x-y plane and GOLFT/L2,TANTO,C1
located 25mm below the top surface of the part. The GOFWD/C1,PAST,L3
reason for defining in this way is to ensure that the
cutter will machine the entire thickness of the part. GOFWD/L3,PAST,L4
GOLEFT/L4,PAST,L1
GOTO/P0

٦
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Postprocessor and Auxiliary Statements
Postprocessor and Auxiliary Statements POSTPROCCER COMMAND/DESCRIPTIVE DATA
A complete APT part program must include functions not
accomplished by geometry statements and motion Where the POSTPROCESSOR COMMAND is an APT major word
commands. These additional functions are implemented including the type of function or action to be accomplished, and the
descriptive data consists of APT minor words and numerical values.
by postprocessor statements and auxiliary statements.
In some commands, the descriptive data is omitted.
Postprocessor statements control the operation of the Examples:
machine tool and play a supporting role in generating the • UNITS/MM indicates that the specified units in the program are
tool path. Such statements are used to define cutter INCHES or MM.
size, specify speeds and feeds, turn coolant flow ON • INTOL/0.02 specifies inward tolerance for circular interpolation
and OFF, and control other features of the particular (OUTTOL/0.02).
machine tool on which the machining job will be • SPINDL/1000,CLW specifies spindle rotation speed in
performed. The general form of a postprocessor revolutions per minute. Either CLW (clockwise) or CCLW
statement is the following: (counterclockwise) can be specified. (SPINDL/OFF)

Computer-Assisted Part Programming Computer-Assisted Part Programming


Postprocessor and Auxiliary Statements
• CUTTER/20 defines cutter diameter for tool path offset Auxiliary statements are used to identify the part program,
calculation specify which postprocessor to use, insert remarks into the
• DELAY/30 temporarily stops the machine tool for a period program, and so on. Auxiliary statements have no effect on
specified in seconds. the generation of tool path.
• FEDRAT/40,IPM specifies feedrate in mm/min or in/min as
specifies in UNITS statements. (FEDRAT/4,IPR) Examples:
• RAPID engage high feedrate for next moves. • PARTNO is the first statement in an APT program, used to
identify the program; for example, PARTNO SAMPLE PART
• COOLNT/FLOOD turns fluid one (COOLNT/MIST)
NUMBER ONE
(COOLNT/OFF) • REMARK is used to insert explanatory comments into the
• LOADTL/01 used with automatic tool changing. program that are not interpreted or processed by the APT
processor.
• FINI indicates the end of an APT program.

Computer-Assisted Part Programming Computer-Assisted Part Programming


Example: Example:
• Drilling
• Drill tool diameter = 7 mm
• Tool number 1
• N = 1000 r.p.m clockwise
• Vf = 0.05 mm/min

• Milling
• End mill tool diameter = 20 mm
• Tool number 2
• N = 1000 r.p.m clockwise
• Vf = 50 mm/min

• Starting point (PTARG) at 0,-50,10

٧
٢٧/٠٢/١٤٣٥

Computer-Assisted Part Programming Computer-Assisted Part Programming


Solution: C1 = CIRCLE/CENTER,P8,RADIUS,30
PARTNO DRILLING AND MILLING PL1 = PLANE/P1,P2,P3
UNITS/MM REMARK Start Milling Operation
CUTTER/20 FROM/PTARG
PTARG = POINT/0,-50,10 LOADTL/02
P1 = POINT/0,0,-10 SPINDL/1000,CLW
P2 = POINT/160,0,-10 FEDRAT/50,IPM
P3 = POINT/16,60,-10 COOLNT/FLOOD
P4 = POINT/35,90,10 GO/TO,L1,TO,PL1,TOL4
P5 = POINT/70,30,10 GORGT/L1,PAST,L2
P6 = POINT/120,30,10 GOLFT/L2,TANTO,C1
P7 = POINT/70,60,10 GOFWD/C1,PAST,L3
P8 = POINT/130,60,10 GOFWD/L3,PAST,L4
GOLFT/L4,PAST,L1
L1 = LINE/P1,P2
L2 = LINE/P2,P3
L3 = LINE/P4,PARLEL,L1
L4 = LINE/P4,P1

Computer-Assisted Part Programming Computer-Assisted Part Programming


REMARK Start Drilling Operation RAPID
RAPID GOTO/P7
GOTO/PTARG FEDRAT/0.05,IPM
SPINDL/OFF GODLTA/0,0,-20
COOLNT/OFF GODLTA/0,0,20
LOADTL/01 RAPID
RAPID GOTO/P8
GOTO/P5 FEDRAT/0.05,IPM
COOLNT/FLOOD GODLTA/0,0,-20
SPINDL/1000,CLW GODLTA/0,0,20
FEDRAT/0.05,IPM RAPID
GODLTA/0,0,-20 GOTO/PTARG
GODLTA/0,0,20 SPINDL/OFF
RAPID COOLNT/OFF
GOTO/P6 FINI
FEDRAT/0.05,IPM
GODLTA/0,0,-20
GODLTA/0,0,20

Engineering Analysis of CNC Positioning Systems Engineering Analysis of CNC Positioning Systems

The NC positioning system converts the coordinate axis values


• The system consists of a cutting tool and a worktable on
in the NC part program into relative positions of the tool and
workpart during processing. Consider the simple positioning which a workpart is fixtured.
system shown in the following figure. • The table is designed to move the part relative to the tool.
• The worktable moves linearly by means of a rotating
leadscrew, which is driven by a stepping motor or
servomotor.
• The leadscrew has a certain pitch p (in/rev, mm/rev).
Thus, the table moves a distance equal to the pitch for
each revolution.
• The velocity of the worktable, which corresponds to
Motor and leadscrew arrangement in an NC positioning system. the feed rate in a machining operation, is determined
by the rotational speed of the leadscrew.

También podría gustarte