Anda di halaman 1dari 15

Computer Aided Manufacturing

AIM: To study the parametric programming.

 INTRODUCTION TO PARAMETRIC PROGRAMMING:

Parametric programming can be compared to any computer


programming language like BASIC, C Language, and PASCAL. However,
this programming language resides right in the CNC control and can be
accessed at G code level, meaning you can combine manual programming
techniques with parametric programming techniques. Computer-related
features like variables, arithmetic, logic statements, and looping are
available. Like computer programming languages, parametric
programming comes in several versions. The most popular is Custom
Macro B (used by Fanuc and Fanuc-compatible controls). Others include
User Task (from Okuma), Q Routine (from Sodick), and Advanced
Programming Language [APL] (from G& L)

In addition to having many computer-related features, most


versions of parametric programming have extensive CNC-related features.
Custom macro, for example, allows the CNC user to access many things
about the CNC control (tool offsets, axis position, alarms, generate G
codes, and program protection) right from within a CNC program. These
things are impossible with only normal G code programming techniques.

 APT LANGUAGE STRUCTURE:

APT or Automatically Programmed Tool is a high-level computer


programming language used to generate instructions for numerically
controlled machine tools. Douglas T. Ross is considered by many to be the
father of APT. APT is a language and system that makes numerically
controlled manufacturing possible. This early language was used widely
into 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 point-to-
point path that a tool must follow to generate a desired form. APT is a CAM
system based on a special-purpose language. It was created and refined
during the late 1950's and early 1960's to simplify the task of calculating
geometry points that a tool must traverse in space to cut the increasingly
complex parts required in the aerospace industry. It was a direct result of
the new CNC technology becoming available at that time, and the daunting
task that a machinist or engineer faced calculating the movements of the
CNC for the complex parts for which it was capable. APT was created
before graphical interfaces were available, and so it relies on text to
specify the geometry and tool paths needed to machine a part.

APT is the three dimensional system that can be used to control


up to five axes. APT can be used to control a variety of different machining
operations. There are four types of statements in the APT language:

1. Geometry statement
2. Motion statement
3. Postprocessor statement
4. Auxiliary statement

 GEOMETRY STATEMENT:

To program in APT, the workpart geometry must first be defined.


The tool is subsequently directed to move to the various point location and
along surfaces of the workpart which have been defined by these
geometry statements.

The general form of the APT geometry statement is this:

Symbol= geometry type / descriptive data

An example of such a statement is

P1= POINT/50, 50, 0


The statement 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 alphabetic and numeric characters. At least
one of six must be an alphabetic character. Also, although it may seem
obvious, the symbol cannot be one of the APT vocabulary words.

The second section of the geometry statement is an APT


vocabulary word that identifies the type of geometry element. Beside
POINT, other geometry elements in the APT vocabulary include 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 elements, and other APT words.

There many other ways to denote the point. They are as follows:

1. intersection of two lines

P1= POINT / INTOF, L1, L2


2. Intersection of a line and a circle.

P1= POINT / XSMALL, INTOF, L, C

3. intersection of two circles:

P1= POINT / YLARGE, INTOF, C1, C2


4. Polar coordinate in coordinate plane.

P1= POINT / RTHETA, YZ PLAN, 27.7914, $

5. on a circle at an angle with x-axis

P1= POINT / CIRCLE, ATANGL, 30º

Similarly lines and circles can be denoted in APT language. For


denoting lines the following expression can be used:

L1=LINE/ POINT1, POINT2

And for denoting circle the following expression can be used:

<SYMBOL>=CIRCLE / <PARAMETRIC STRING>


 MOTION STSTEMENT:

APT motion statements have a general format, just as the


geometry statements do. The general form of a motion statement is

Motion command / descriptive data

An example of a motion statement is

GOTO/P1 (P1 = POINT/50, 50)

The statement consists of two sections separated by a slash.


The first section is the basic motion command, which tells the tool what to
do. The second section is comprised of descriptive data, which tell the tool
where to go. In the example statement above, the tool is commanded to go
to point P1, which has been defined in a preceding geometry statement.

The GODLTA command specifies an incremental move for the


tool. For example, the statement

GODLTA/2.0,7.0,0.0 instructs the tool to move from its present


position 2 in the x direction and 7 in the y direction.
 CONTOURING MOTIONS:

Contouring commands are somewhat more complicated


because the tool’s position must be continuously controlled throughout the
move. To accomplish this control, the tool is directed along two intersecting
surfaces. These surfaces have very specific means in APT:

1. Drive surface: This is the surface that guides the side of the
cutter.
2. Part surface: This is the surface on which the bottom of the
cutter rides. The part programmer must define this plus the drive
surface for the purpose of maintaining continuous path control of
the tool.
3. Check surfaces: This is the surface that stops the movement of
the tool in its current direction. In a sense, it checks the forward
movement of the tool.

The APT contour motion statement commands the cutter to


move along the drive and part surfaces and the movement ends when the
tool is at the check surface. There six motion command words:

GOLFT, GOFWD, GOUP, GORGT, GOBACK, GODOWN

 POSTPROCESSOR STATEMENT:

To write a complete program, statement must be written that


control the operation of the spindle, the feed, and other features of the
machine tool. These are called postprocessor statements. Some of the
common postprocessor statements that appear in the appendix at the end
of the chapter are:

COOLNT/, RAPID, END, SPINDL/, FEDRAT/, TURRET/,


MACHIN/.
The postprocessor statements, and the auxiliary statements in
the following section, are of two forms either with or without the slash. The
statements with the slash are self-contained. The APT words with the
slash require descriptive data after the slash. For example

The FEDRAT stands for feed rate and the interpretation of feed
differs for different machining operations. In a drilling operation the feed is
in the direction of the drill bit axis.

 AUXILIARY STATEMENTS:

The complete APT program must also contain various other


statements, called auxiliary statements. These are used for cutter size
definitions, part identification, and so on. The following APT words used in
auxiliary statements are defined in the appendix to this chapter:

CLPRNT, INTOL/, CUTTER, OUTTOL/, FINI, PARTNO.

CUTTER/.500 would instruct the APT program that the cutter


diameter is 0.500 in. Therefore the tool path must be offset from the part
outline by 0.250 in.

 COMPILATION CONTROL COMMANDS:

This segment covers various statements that normally prepare


the computer for accepting the part program, improve the readability of the
part program and control the output of the computer.

PARTNO/<literal string>

The PARTNO is used as an identification of the part program


and as such should form the very first statement in the part program. The
FINI statement is the physical end of the part program and should always
be present at the end of any program.
 EXAMPLE PROGRAM BASED ON APT LANGUAGE:

Tool Path for program


PARTNO / APT-1
CLPRNT
UNITS / MM
NOPOST
CUTTER / 10.0
$$GEOMETRY DEFINITION
SETPT = POINT / 0.0, 0.0, 0.0
STRTPT = POINT / 70,70,0
P1 = POINT / 50, 50, 0
P2 = POINT / 20, -20, 0
C1 = CIRCLE / CENTER, P2, RADIUS, 30
P3 = POINT / -50, -50, 0
P4 = POINT / -30, 30, 0
C2 = CIRCLE / CENTER, P4, RADIUS, 20
P5 = POINT / 50, -20, 0
L1 = LINE / P1, P5
L2 = LINE / P3, PERPTO, L1
L3 = LINE / P3, PARLEL, L1
L4 = LINE / P1, PERPTO, L1
PLAN1 = PLANE / P1, P2, P3
PLAN2 = PARLEL, PLAN1, ZSMALL, 16
$$MOTION COMMANDS
SPINDL / 3000, CW
FEDRAT / 100, 0
FROM / STRTPT
GO/TO L1, TO, PLAN2, TO, L4
TLLFT, GOFWD / L1, TANTO, C1
GOFWD / C1, TANTO, L2
GOFWD / L2, PAST, L3
GORGT / L3, TANTO, C2
GOFWD / C2, TANTO, L4
GOFWD / L4, PAST, L1
NOPS
GOTO / STRTPT
FINI

 EXAMPLE-2

Write the APT program for the part shown in figure above.

The designation of the lathe axes for APT programming is the


same as that for milling machine i.e. XY coordinates are changed to ZX
coordinates by the postprocessor when the control tape is punched.
 SOLUTION:

PARTNO SHAFT NO 1

MACHINE/LATHE, 10

UNITS/MM

CLPRNT

SETPT = POINT/ 100, 200

PT1= POINT/5, 0

PT2= POINT/5, -10

PT3= POINT/10, -30

PT4= POINT/15, -40

PT5= POINT/25, -70

PT6= POINT/25, -80

PT7= POINT/5, 5

C1= CIRCLE/ (5, -15), 5

LN2= LINE/PT1, PT2

LN3= LINE/PT3, PT4

C2= CIRCLE/25, -60, 10

LN4= LINE/PT4, RIGHT, TANTO, C2

LN5= LINE/PT5, PT6

LN6= LINE/P6, PERPTO, LN5

CUTTER/10

FEDRAT/0.4, MMPR
SPINDL/1000, RPM

FROM/SETPT

RAPID

GOTO/PT7 $$ RAPID APPROACH TO A CONVENIENT POINT

COOLNT/ON

GO/TO, LN1

GOLFT/LN1, TO, C1

GOLFT/C1, YO, LN2

GOFWD/LN2, TO, LN3

GOLFTL/LN3, TO, LN4

GOLFT/LN4, TO, C2

GOLFT/C2, PAST, LN5

GOLFT/LN5, TO, LN6

SPINDL/OFF

COOLNT/OFF

RAPID

GOTO/SETPT

REWIND

FINI
EXAMPLE-3

MACHIN/MILL, 02

CLPRNT

UNITS/MM

CUTTER/25.0

TARGET= POINT/-50, -50, 10

P1= POINT/0, 0, -25

P2= POINT/120, 0, -25

P3= POINT/120, 60, -25

C1= POINT/100, 60, -25

P4= POINT/88.25, 76.2, -25

P5= POINT/20, 20, -25

P6= POINT/0, 20, -25


L1= LINE/P1, P2

L2= LINE/P2, P3

CR1= CIRCLE/CENTRE, C1, TANTO, L2

L3= LINE/P4, P5

L4= LINE/P5, P6

L5= LINE/P6, P1

PL1= PLANE/P1, P2, P3

FROM/TARGET

GO/TO, L1, PL1, ON, L5

SPINDL/500, CLW

FEDRAT/50, MMPM

GORGT/L1, PAST, L2

GOLFT/L2, TANTO, CR1

GOFWD/CR1, PAST, L3

GOFWD/L3, TO, L4

GOFWD/L4, PAST, L5

GOLFT/L5, PAST, L1

RAPID

GOTO/TARGET

SPINDL/OFF

FINI

Anda mungkin juga menyukai