Module III & V
Module III & V
AM/JA
Module 3
NC part programming: part programming fundamentals - manual programming NC
co-ordinate systems and axes tape format sequence number, preparatory
functions, dimension words, speed word, feed world, tool world, miscellaneous
functions programming exercises.
Computer aided part programming: concept & need of CAP CNC languages APT
language structure: geometry commands, motion commands, postprocessor
commands, compilation control commands programming exercises
DISCLAIMER
These notes are not the ultimate look-up for Model and University exams. Students are advised to read the
references mentioned at the end thoroughly for the exams
Module III
NC PART PROGRAMMING
INTRODUCTION
Numerical control part programming is the procedure by which the sequence of
processing steps to be performed on the NC machine is planned and documented. It involves
the preparation of a punched tape (or other input medium) used to transmit the processing
instructions to the machine tool. There are two methods of part programming: manual part
programming and computer-assisted part programming. In this chapter we describe both of
these methods, with emphasis on the latter.
It is appropriate to begin the discussion of NC part programming by examining the
way in which the punched tape is coded. Coding of the punched tape is concerned with the
basic symbols used to communicate a complex set of instructions to the NC machine tool. In
numerical control, the punched tape must be generated whether the part programming is done
manually or with the assistance of some computer package. With either method of part
programming, the tape is the net result of the programming effort. In coming sections our
attention will be focused on the punched tape and the structure of the basic language used by
the NC system.
NC PART PROGRAMMING
AM/JA
PUNCHED TAPE IN NC
The part program is converted into a sequence of machine tool actions by means of
the input medium, which contains the program, and the controller unit, which interprets the
input medium. The controller unit and the input medium must be compatible. That is, the
input medium uses coded symbols which represent the art program, and the controller unit
must be capable of reading those symbols. [be most common input medium is punched tape.
The tape has been standardized, 0 that type punchers are manufactured to prepare the NC
tapes, and tape readers part of the controller unit) can be manufactured to read the tapes. The
punched ape used for NC is 1 in. wide. It is standardized as shown in Figure by the
electronics Industries Association (EIA), which has been responsible for many of he
important standards in the NC industry.
There are two basic methods of preparing the punched tape. The first method
associated with manual part programming and involves the use of a typewriter like device.
Figure illustrates a modern version of this kind of equipment. The operator types directly
from the part programmer's handwritten list of coded instructions. This produces a typed
copy of the program as well as the punched type. The second method is used with computerassisted part programming. By this approach, the tape is prepared directly by the computer
using a device called a tape punch.
NC PART PROGRAMMING
AM/JA
By either method of preparation, the punched tape is ready for use. During
production on a conventional NC machine, the tape is fed through the tape reader once for
each workpiece. It is advanced through the tape reader one instruction at a time. While the
machine tool is performing one instruction, the next instruction is being read into the
controller unit's data buffer. This makes the operation of the NC system more efficient. After
the last instruction has been read into the controller, the tape is rewound back to the start of
the program to be ready for the next workpart.
NC PART PROGRAMMING
AM/JA
To separate blocks, an end-of-block (EOB) symbol is used (in the EIA standard, this
is a hole in column 8). The tape reader feeds the data from the tape into the buffer in blocks.
That is, it reads in a complete instruction at a time.
NC words
Following is a list of the different types of words in the formation of a block. Not
very NC machine uses all the words. Also, the manner in which the words are expressed will
differ between machines. By convention, the words in a block are given in the following
order:
EQUENCE NUMBER (n-words): This is used to identify the block.
REPARATORY WORD (g-words): This word is used to prepare the controller for
instructions that are to follow. For example, the word g02 is used to prepare the C controller
unit for circular interpolation along an arc in the clockwise direction. The preparatory word
1& needed S9 that the controller can correctly interpret the data that follow it in the block.
COORDINATES (x-, y-, and z-words): These give the coordinate positions of the tool. In a
two-axis system, only two of the words would be used. In a four- or five-axis machine,
additional a-words and V or b-words would specify the angular positions.
Although different NC systems use different formats for expressing a coordinate, we
will adopt the convention of expressing it in the familiar decimal form: For example, x +
7.235 ory-0.5ao. Some formats do not use the decimal point in writing the coordinate. The +
sign to define a positive coordinate location is optional. The negative sign is, of course,
mandatory.
FEED RATE (f-word): This specifies the feed in a machining operation. Units are inches per
minute (ipm) by convention.
CUTTING SPEED (s-word): This specifies the cutting speed of the process, the rate at
which the spindle rotates.
TOOL SELECTION (t-word): This word would be needed only for machines with a tool
turret or automatic tool changer. The t-word specifies which tool is to be used in the
operation. For example, t05 might be the designation of a 1/2-in. drill bit in turret position 5
on an NC turret drill.
MSCELLANEOUS FUNCTION (m-word): The m-word is used to specify certain
miscellaneous or auxiliary functions which may be available on the machine tool. Of course,
Department of Mechanical Engineering, AJCE
NC PART PROGRAMMING
AM/JA
the machine must possess the function that is being called. An example would be m03 to start
the spindle rotation. The miscellaneous function is the last word in the block. To identify the
end of the instruction, an end-of-block (EOB) symbol is punched on the tape.
EXAMPLE
Suppose that the part to be programmed is a drilling job. The engineering drawing
for the part is presented in Figure. Three holes are to be drilled at a diameter of 31 in. The
close hole size tolerance requires reaming to 0.500 in. diameter. Recommended speeds and
feeds are as follows:
0.484-in.-diameter drill
Speed (rpm)
Speed (in./min)
592
3.55
Department of Mechanical Engineering, AJCE
NC PART PROGRAMMING
AM/JA
0.500-in.-diameter drill
382
3.82
The NC drill press operates as follows. Drill bits are manually changed by the
machine operator, but speeds and feeds must be programmed on the tape. The machine has
the floating-zero feature and absolute positioning.
NC PART PROGRAMMING
AM/JA
AM/JA
NC PART PROGRAMMING
AM/JA
NC PART PROGRAMMING
AM/JA
NC PART PROGRAMMING
10
AM/JA
NC PART PROGRAMMING
11
AM/JA
NC PART PROGRAMMING
12
NC PART PROGRAMMING
AM/JA
13
NC PART PROGRAMMING
AM/JA
the engineering drawing is followed as. The machining instructions are written in Englishlike statements of the NC programming language, which are then processed by the computer
to prepare the tape. The comter automatically punches the tape in the proper tape format for
the particular C machine.
The part programmer's responsibility in computer-assisted part programming
consists of two basic steps:
1. Defining the workpart geometry
2. Specifying the operation sequence and tool path
No matter how complicated the workpart may appear, it is composed of sic
geometric elements. Using a relatively simple workpart to illustrate, consider e component
shown in Figure. Although somewhat irregular in overall appearance, the outline, of the part
consists of intersecting straight lines and a partial circle. The holes in the part can be
expressed in terms of the center location and radius of the hole. Nearly any component that
can be conceived by a designer can be described by points, straight lines, planes, circles,
cylinders, and other mathematically defined surfaces. It is the part programmer's task to
enumerate the ements out of which the part is composed. Each geometric element must be
identified and the dimensions and location of the element explicitly defined.
After defining the workpart geometry, the programmer must next construct e path
that the cutter will follow to machine the part. This tool path specification involves a detailed
step-by-step sequence of cutter moves. The moves are made among the geometry elements,
which have previously been defined. The part programmer can use the various motion
commands to direct the tool to machine along the workpart surfaces, to go to point locations,
to drill holes at these locations, and so on. In addition to part geometry and tool motion
statements, the programmer must also provide other instructions to operate the machine tool
properly.
14
NC PART PROGRAMMING
AM/JA
Sample workpart, like other parts, can be defined in terms of basic geometric elements, such
as points, lines, and circles.
15
NC PART PROGRAMMING
AM/JA
16
NC PART PROGRAMMING
AM/JA
As noted previously, NC machine tool systems are different. They have different
features and capabilities. They use different NC tape formats. Nearly all of part programming
languages, including APT, are designed to be general purpose languages, not limited to one
or two machine tool types. Therefore, the al task of the computer in computer-assisted part
programming is to take the general instructions and make them specific to a particular
machine tool system. The unit that performs this task is called a postprocessor.
The postprocessor is a separate computer program that has been written to prepare
the punched tape for a specific machine tool. The input to the postprocessor is output from
the other three components: a series of cutter locations and other ructions. The output of the
postprocessor is the NC tape written in the correct format for the machine on which it is to be
used.
17
NC PART PROGRAMMING
AM/JA
directly on the APT program. One of these is ADAPT, which was developed by IBM under
Air Force contract. It was intended to provide many of the features of APT but to utilize a
smaller computer. The full APT program requires a computing system that would have been
considered large by the standards of the 1960s. This precluded its use by many small and
medium-sized firms that did not have access to a large computer. ADAPT is not as powerful
as APT, but it can be used to program for both positioning and contouring jobs.
EXAPT (Extended subset of APT). This was developed in Germany starting around
1964 and is based on the APT language. There are three versions:
EXAPT I-designed for positioning (drilling and also straight-cut milling), EXAPT IIdesigned for turning, and EXAPT III-designed for limited contouring operations. One of the
important features of EXAPT is that it attempts to compute optimum feeds and speeds
automatically.
UNIAPT. The UNIAPT package represents another attempt to adapt the APT
language to use on smaller computers. The name derives from the developer, the United
Computing Corp. of Carson, California. Their efforts have provided a limited version of APT
to be implemented on minicomputers, thus allowing many smaller shops to possess
computer-assisted programming capacity.
SPLIT (Sundstrand Processing Language Internally Translated). This is a
proprietary system intended for Sundstrand's machine tools. It can handle up to five-axis
positioning and possesses contouring capability as well. One of the unusual features of SPLIT
is that the postprocessor is built into the program. Each machine tool uses its own SPLIT
package, thus obviating the need for a special postprocessor.
COMPACT II. This is a package available from Manufacturing Data Systems, Inc.
(MDSI), a firm based in Ann Arbor, Michigan. The NC language is similar to SPLIT in many
of its features. MDSI leases the COMPACT II system to its users on a time-sharing basis.
The part programmer uses a remote terminal to feed the program into one of the MDSI
computers, which in turn produces the NC tape. The COMPACT II language is one of the
most widely used programming languages. MDSI has roughly 3000 client companies which
use this system.
PROMPT. This is an interactive part programming language offered by Weber N/C
System, Inc., of Milwaukee, Wisconsin. It is designed for use with a variety of machine tools,
including lathes, machining centers, flame cutters, and punch presses.
Department of Mechanical Engineering, AJCE
18
NC PART PROGRAMMING
AM/JA
Geometry statements. These define the geometric elements that comprise the
workpart. They are also sometimes called definition statements.
2.
Motion statements. These are used to describe the path taken by the cutting tool.
3.
Postprocessor statements. These apply to the specific machine tool and control
system. They are used to specify feeds and speeds and to actuate other features of the
machine.
4.
Auxiliary statements. These are miscellaneous statements used to identify the part,
tool, tolerances, and so on.
Geometry statements
To program in APT, the workpart geometry must first be defined. The tool is
subsequently directed to move to the various point locations and along surfaces of the
Department of Mechanical Engineering, AJCE
19
NC PART PROGRAMMING
AM/JA
workpart which have been defined by these geometry statements. The definition of the
workpart elements must precede the motion statements.
The general form of an APT geometry statement is this:
An example of such a statement is
P1 = POINT/5.0, 4.0, 0.0
This 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 the 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. Besides 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.
The punctuation used in the APT geometry statement is illustrated in the example,
Eq. .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.
There are a variety of ways to specify the different geometry elements. The appendix
at the end of this chapter presents a dictionary of APT vocabulary words as well as a
sampling of statements for defining the geometry elements we will be using: points, lines,
circles, and planes. The reader may benefit from a few examples.
To specify a line, the easiest method is by two points through which the line asses:
L3 = LINE/P3, P4
The part programmer may find it convenient to define a new line parallel to another
line which has previously been defined. One way of doing this would be
L4 = LINF/P5, PARLEL, L3
This states that the line L4 must pass through point P5 and be parallel (PARLEL) line L3.
Department of Mechanical Engineering, AJCE
20
NC PART PROGRAMMING
AM/JA
21
NC PART PROGRAMMING
AM/JA
following two statements in the same program would render the program incorrect:
P1 = POINT/l.0, l.0, l.0 n = POINT/l.0, l.0, l.0
5. Lines defined in APT are considered to be of infinite length in both directions.
Similarly, planes extend indefinitely and circles defined in APT are complete circles.
Workpart from previous figure redrawn with x-y coordinate system and geometric
elements labeled.
EXAMPLE
To illustrate some of these geometry statements we will define the geometry of the
workpart shown in Figure 8.6. The drawing of the part is duplicated in Figure 8.9, except that
we have added the coordinate axis system and labeled the various geometric elements. We
also add the target point P0 to be used in subsequent motion commands.
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
Motion statements
APT motion statements have a general format, just as the geometry statements do.
The general form of a motion statement is
Department of Mechanical Engineering, AJCE
22
NC PART PROGRAMMING
AM/JA
motion command/descriptive data
The example of a motion statement is
GOTO/Pl
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 PI, which has been defined in a preceding geometry statement.
At the beginning of the motion statements, 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
The FROM is an APT vocabulary word which indicates that this is the initial point
from which others will be referenced. In the statement above, 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. The FROM statement occurs only at the start of the motion sequence.
It is convenient to distinguish between PTP movements and contouring movements
when discussing the APT motion statements.
POINT-TO-POINT MOTIONS. There are only two basic PTP motion commands:
GOTO and GODLTA. The GOTO statement instructs the tool to go to a particular point
location specified in the descriptive data. Two examples would be:
GOTO/P2
GOTO/2.0, 7.0, 0.0
In the first statement, P2 is the destination of the tool point. In the second statement,
the tool has been instructed to go to the location whose coordinates are x = 2.0, y = 7.0, and z
= O.
23
NC PART PROGRAMMING
AM/JA
The GODLTA command specifies an incremental move for the tool. For example,
the statement
GODLA/2.0, 7.0, 0.0
instructs the tool to move from its present position 2 in. in the x direction and 7 in. in
the y direction. The z coordinate remains unchanged.
The GODLTA command is useful in drilling and related operations. The tool can be
directed to a particular hole location with the GOTO statement. Then the GODLTA
command would be used to drill the hole, as in the following sequence:
GOTO/P2
GODLTNO, 0, -1.5
GODLTNO, 0, + 1.5
EXAMPLE
Previous example was a PTP job which was programmed manually. Let us write the
APT geometry and motion statements necessary to perform the drilling portion of this job.
We will set the plane defined by z = 0 about 1/4 in. above the part surface. The part will be
assumed to be 1/2 in. thick. The reader should refer back to Figures 8.3 and 8.4.
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
GODLTA/0, 0, + 1.0
GOTO/P2
GODLTA/0, 0, -1.0
GODLTA/0, 0, +1.0
GOTO/P3
Department of Mechanical Engineering, AJCE
24
NC PART PROGRAMMING
AM/JA
GODLTA/0, 0, -1.0
GODLTA/0, 0, +1.0
GOTO/P0
This is not a complete APT program because it does not contain the necessary
auxiliary and postprocessor statements. However, the statement sequence demonstrates how
geometry and motion statements can be combined to command the tool through a series of
machining steps.
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 as shown in
Figure 8.10. These surfaces have very specific names in APT:
1. Drive surface. This is the surface (it is pictured as a plane in Figure 8.10) that
guides the side of the cutter.
2. Part surface. This is the surface (again shown as a plane in the figure) on which
the bottom of the cutter rides. The reader should note that the "part surface" mayor may not
be an actual surface of the workpart. The part programmer must define this plus the drive
surface for the purpose of maintaining continuous path control of the tool.
There is one additional surface that must be defined for APT contouring motions:
Three surfaces in APT contouring motions which guide the cutting tool.
3. Check surface. 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.
There are several ways in which the check surface can be used. This is determined
Department of Mechanical Engineering, AJCE
25
NC PART PROGRAMMING
AM/JA
by APT modifier words within the descriptive data of the motion statement. The three main
modifier words are TO, ON, and PAST, and their use with regard to the check surface is
shown in Figure. A fourth modifier word is TANTO. This is used when the drive surface is
tangent to a circular check surface, as illustrated in Figure. In this case the cutter can be
brought- to the point of tangency with the circle by use of the TANTO modifier word.
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 are six
motion command words:
GOLFT
GOFWD
GOUP
GORGT
GOBACK
GODOWN
Use of APT modifier words in a motion statement: TO. ON and PAST. TO moves
tool into initial contact with check surface. ON moves tool until tool center is on check
surface. PAST moves tool just beyond check surface.
Previous figure Use of APT modifier word TANTO. TANTO moves tool to point of
tangency between two surfaces, at least one of which is circular.
Their interpretation is illustrated in Figure. 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. In the use of these words, it is helpful
for the programmer to assume the viewpoint that the workpiece remains stationary and the
tool is instructed to move relative to the piece. To begin the sequence of motion commands,
the FROM statement, Eq. 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. The sequence is of the following form:
26
NC PART PROGRAMMING
AM/JA
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.
27
NC PART PROGRAMMING
AM/JA
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.
For instance, consider Figure. The cutter has been directed from TARG to the intersection of
surfaces PU, PL2, and PU. It is desired to move the tool along plane PL3. The following
command would be used:
GORGT/PL3, PAST, PL4
This would direct the tool to move along PL3, using it as the drive surface. The tool
would continue until past surface PL4, which is the new check surface. Although the part
surface (PL2) may remain the same throughout the motion sequence, the drive surface and
check surface are redefined in each new command.
Let us consider an alternative statement to the above which would accomplish the
same motion but would lead to easier programming:
GORGT/U, PAST, L4
We have substituted lines L3 and L4 for planes PL3 and PL4, respectively. When
looking at a part drawing, such as Figure, the sides of the part appear as lines. On the actual
part, they are three-dimensional surfaces, of course. However, it would be more convenient
for the part programmer to define these surfaces as lines and circles rather than planes and
cylinders. Fortunately, the APT computer program allows the geometry of the part to be
defined in this way. Hence the lines L3 and L4 in the foregoing motion statement are treated
as the drive surface and check surface. This substitution can only be made when the part
surfaces are perpendicular to the x-y plane.
28
NC PART PROGRAMMING
AM/JA
refer back to the workpart of Example. The geometry statements were listed in this example
for the part shown in Figure . Using the geometric elements shown in this figure, following is
the list of motion statements to machine around the periphery of the part. The sequence
begins with tool located at the target point PO.
FROM/PO
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
The reader may have questioned the location of the part surface (PLl) in the APT
sequence. For this machining job, the part surface must be defined below the bottom plane of
the workpiece in order for the cutter to machine the entire thickness of the piece. Therefore,
the part surface is really not a surface of the part at all.
Example raises several other questions: How is the cutter size accounted for in the
APT program? How are feeds and speeds specified? These and other questions are answered
by the postprocessor and auxiliary statements.
Postprocessor statements
To write a complete part program, statements 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 selfDepartment of Mechanical Engineering, AJCE
29
NC PART PROGRAMMING
AM/JA
contained. No additional data are needed. The APT words with the slash require descriptive
data after the slash. These descriptions are given for each word in the appendix.
The FEDRAT/ statement should be explained. 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. However, in an end milling operation, typical for
NC, the feed would be in a direction perpendicular to the axis of the cutter.
Auxiliary statements
The complete APT program must also contain various other statements, called
auxiliary statements. These are used for cutter size definition, 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
The offset calculation of the tool path from the part outline is based on the
CUTTER/definition. For example, the statement
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.
EXAMPLE
We are now in a position to write a complete APT program. The workpart of
Example 8.4 will be used to illustrate the format of the APT program.
We will assume that the workpiece is a low-carbon steel plate, which has previously
been cut out in the rough shape of the part outline. The tool is a Y2-in.-diameter end-milling
cutter. Typical cutting conditions might be recommended as follows: cutting speed = 573 rpm
and feed = 2.29in.lmin.
Figure 8.15 presents the program with correct character spacing identified at the top
as if it were to be keypunched onto computer cards. Modem NC programming systems utilize
a CRT terminal for program entry.
30
NC PART PROGRAMMING
AM/JA
31
NC PART PROGRAMMING
AM/JA
CALL/symbol, parameter 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.
An example will serve to illustrate the use of the MACRO statement and how the
MACRO would be called by the main APT program.
EXAMPLE
We will refer back to the drilling operations of Example. In this example the
GODLTA sequence was repeated in the program a total of three times, once for each hole.
This represents an opportunity to use the MACRO feature in the APT system. The four point
locations (P0, P1, and P3) would be defined just as they are in Example. These points would
be used in the MACRO subroutine and main APT program in the following way:
DRILL = MACRO/PX
GOTO/PX
GODLTA/0, 0, -1.0
GODLTA/0, 0, + 1.0
TERMAC
FROM/P0
CALL/DRILL, PX = P1
CALL/DRILL, PX = P2
CALL/DRILL, PX = P3
GOTO/PO
In this example the number of APT motion statements in the main program has been
reduced from 11 down to five. (If we include the MACRO subroutine in our line count, the
reduction is from 11 statements to 10.) The reader can visualize the power of the MACRO
feature for a programming job in which there are a large number of holes to be drilled. The
savings in the required number of APT statements would approach 66 2/3% in this case, since
one call statement replaces three motion statements in the program.
The MACRO feature has many uses in APT. They are limited primarily by the
Department of Mechanical Engineering, AJCE
32
AM/JA
NC PART PROGRAMMING
imagination of the part programmer. Some of these uses will be considered in the exercise
problems at the end of the chapter. It is even possible to have a CALL/ statement within one
MACRO which refers to another MACRO subroutine. This might be used for example in a
matrix of holes where both the x and y positions of the holes are changed with each drilling
operation.
33
34
AM/JA
Module V
Robotics: Industrial robots and their applications for transformational and handlingactivities,
configuration and motion, actuators, sensors and end effectors, feature like work envelope,
precision of movement, weight carrying capacity, robot programming languages.Vision
systems: Introduction to intelligent robots.
DISCLAIMER
These notes are not the ultimate look-up for Model and University exams. Students are advised to read the
references mentioned at the end thoroughly for the exams
Module V
ROBOT TECHNOLOGY
INTRODUCTION
An industrial robot is a general-purpose, programmable machine possessing certain
anthropomorphic characteristics. The most typical anthropomorphic, or human like,
characteristic of a robot is its arm. This arm, together with the robot's capacity to be
programmed, makes it ideally suited to a variety of production tasks, including machine
loading, spot welding, spray painting, and assembly. The robot can be programmed to
perform a sequence of mechanical motions, and it can repeat that motion sequence over and
over until reprogrammed to perform some other job.
An industrial robot shares many attributes in common with a numerical control
machine tool. The same type of C technology used to operate machine tools is used to actuate
the robot's mechanical arm. The robot is a lighter, more portable piece of equipment than an
NC machine tool. The uses of the robot are more general, typically involving the handling of
work parts. Also, the programming of the robot is different from NC part programming.
Traditionally, NC programming has been performed off-line with the machine commands
being contained on a punched tape. Robot programming has usually been accomplished online, with the instructions being retained in the robot's electronic memory. In spite of these
differences, there are definite similarities between robots and NC machines in terms of
power; drive technologies, feedback systems, the trend toward computer control, and even
some of the industrial applications.
Department of Mechanical Engineering, AJCE
ROBOT TECHNOLOGY
AM/JA
The popular concept of a robot has been fashioned by science fiction novels and
movies such as "Star Wars." These images tend to exaggerate the robot's similarity to human
anatomy and behavior. The human analogy has sometimes been a troublesome issue in
industry. People tend to associate the future use of advanced robots in factories with high
unemployment and the subjugation of human beings by these machines.
Largely in response to this humanoid conception associated with robots, there have
been attempts to develop definitions which reduce the anthropomorphic impact. The Robot
Institute of America has developed the following definition:
A robot is a programmable, multi-function manipulator designed to move material,
parts, tools, or special devices through variable programmed motions for the performance of
a variety of tasks.
Attempts have even been made to rename the robot. George Devol, one of the
original inventors in robotics technology, called his patent application by the name
"programmed article transfer." For many years, the Ford Motor Company used the term
"universal transfer device" instead of "robot." Today the term "robot" seems to have become
entrenched in the language, together with whatever human like characteristics people have
attached to the device.
35
ROBOT TECHNOLOGY
AM/JA
The four types are schematically illustrated in Figure and described below.
FIGURE shows the four most common robot configurations: (a) polar coordinate;
(b) cylindrical coordinate; (c) jointed arm configuration; (d) Cartesian coordinate.
Polar coordinate configuration
This configuration also goes by the name "spherical coordinate," because the
workspace within which it can move its arm is a partial sphere. As shown in Figure, the robot
has a rotary base and a pivot that can be used to raise and lower a telescoping arm. One of the
most familiar robots, the Unimate Model 2000 series, was designed around this
configuration,
36
ROBOT TECHNOLOGY
AM/JA
37
ROBOT TECHNOLOGY
AM/JA
Motion systems
Similar to NC machine tool system~: the motion systems of industrial robots can be classified
as either point-to-point (PIP) or contouring (also called continuous path).
In PTP, the robot's movement is controlled from one point location in space to
another. Each point is programmed into the robot's control memory and then played back
during the work cycle. No particular attention is given to the path followed by the robot in its
move from one point to the next. Point-to-point robots would be quite capable of performing
Department of Mechanical Engineering, AJCE
38
ROBOT TECHNOLOGY
AM/JA
certain kinds of productive operations, such as machine loading and unloading, pick-andplace activities, and spot welding.
Contouring robots have the capability to follow a closely spaced locus of points
which describe a smooth compound curve. The memory and control requirements are greater
for contouring robots than for PIP because the complete path taken by the robot must be
remembered rather than merely the end points of the motion sequence. However, in certain
industrial operations, continuous control of the work cycle path is essential to the use of the
robot in the operation. Examples of these operations are paint spraying, continuous welding
processes, and grasping objects moving along a conveyor.
ER TECHNICAL FEATURES
In addition to the robot's physical configuration and basic motion capabilities, there
are numerous other technical features of an industrial robot which determine its efficiency
and effectiveness at performing a given task. The following are some-of the most important
among these technical features:
1. Work volume
3. Speed of movement
4. Weight-carrying capacity
5. Type of drive system
These features are described in this section.
Work volume
The term "work volume" refers to the space within which the robot can operate. To be
technically precise, the work volume is the spatial region within which the end of the robot's
wrist can be manipulated. Robot manufacturers have adopted the policy of defining the work
volume in terms of the wrist end, with no hand or tool attached.
The work volume of an industrial robot is determined by its physical configuration,
size, and the limits of its arm and joint manipulations. The work volume of a cartesian
coordinate robot will be rectangular. The work volume of a cylindrical coordinate robot will
be cylindrical. A polar coordinate configuration will generate a work volume which is a
partial sphere. The work volume of a jointed arm robot will be somewhat irregular, the outer
reaches generally resembling a partial sphere. Robot manufacturers usually show a diagram
Department of Mechanical Engineering, AJCE
39
ROBOT TECHNOLOGY
AM/JA
of the particular model's work volume in their marketing literature, providing a top view and
side view with dimensions of the robot's motion envelope.
Precision of movement
The precision with which the robot can move the end of its wrist is a critical
consideration in most applications. In robotics, precision of movement is a complex issue,
and we will describe it as consisting of three attributes:
I. Spatial resolution
2. Accuracy
3. Repeatability
These attributes are generally interpreted in terms of the wrist end with no end
effector attached and with the arm fully extended.
SPATIAL RESOLUTION. The term "spatial resolution" refers to the smallest
increment of motion at the wrist end that can be controlled by the robot. This is determined
largely by the robot's control resolution, which depends on its position control system and/or
its feedback measurement system. In addition, mechanical inaccuracies in the robot's joints
would tend to degrade its ability to position its arm. The spatial resolution is the sum of the
control resolution plus these mechani. The factor determining control resolution are the range
of movement of the arm and the bit storage capacity in the control memory for that
movement. The arm movement must be divided into its basic motions or degrees of freedom,
and the resolution of each degree of freedom is figured separately. Then the total control
resolution is the vector sum of each component. An example will serve to illustrate this.
EXAMPLE
Assume that we want to find the spatial resolution for a cartesian coordinate robot
that has two degrees of freedom. 1be two degrees of freedom are manifested by two
orthogonal slides. Each slide has a range of 0.4 m (about 15.75 in.), hence giving the robot a
work volume which is a plane square, with 0.4 m on a side. Suppose that the robot's control
memory has a 100bit storage capacity for each axis.
To determine the control resolution, we must first determine the number of control
increments of which the control memory is capable. For the IO-bit storage, there are 210 =
1024 control increments (the number of distinct zones into which the slide range of 0.4 m can
be divided).
Department of Mechanical Engineering, AJCE
40
ROBOT TECHNOLOGY
AM/JA
Then the control resolution would be found by dividing the slide range by the
number of control increments:
control resolution =
0.4m
= 0.3906 mm
1024
Since there are two orthogonal slides, the control resolution of this robot would be a
square with 0.39 mm per side. Any mechanical inaccuracies would be added to this figure to
get the spatial resolution.
This example shows that the spatial resolution can be improved by increasing the bit
capacity of the robot's control memory. Also, for a given memory capacity, a larger robot
would have a poorer (larger) spatial resolution than a small robot. In reality, the spatial
resolution would be worse (larger) than the control resolution computed in Example 10.1
because of mechanical inaccuracies in the slides.
ACCURACY. The accuracy of the robot refers to its capability to position its wrist
end (or a tool attached to the wrist) at a given target point within its work volume. Accuracy
is closely related to spatial resolution, since the robot's ability reach a particular point in
space depends on its ability to divide its joint movements into small increments. According to
this relation, the accuracy of the robot would be one-half the distance between two adjacent
resolution points. This definition is illustrated in Figure. The robot's accuracy is also affected
by mechani-11 inaccuracies, such as deflection of its components, gear inaccuracies, and so
worth.
REPEATABILITYY. This refers to the robot's ability to position its wrist end (or ol)
back to a point in space that was previously taught. Repeatability is different from accuracy.
The difference is illustrated in Figure 10.8. The robot was initially
41
ROBOT TECHNOLOGY
AM/JA
Speed of movement
The speed with which the robot can manipulate the end effect or ranges up to a
maximum of about 1.5 m/s. Almost all robots have an adjustment to set the speed to the
Department of Mechanical Engineering, AJCE
42
ROBOT TECHNOLOGY
AM/JA
desirable level for the task performed. This speed should be determined by precision with
which the object must be positioned during the work cycle. Heavy objects cannot be moved
as fast as light objects because of inertia problems. Also, objects must be moved more slowly
when high positional accuracy is required.
Weight-carrying capacity
The weight-carrying capacity of commercially available robots covers a wide range.
At the upper end of the range, there are robots capable of lifting over 1000 lb. The Versatran
FC model has a maximum load-carrying capacity rated at 2000 lb. At the lower end of the
range, the Unimate PUMA Model 250 has a load capacity of only 2.5 lb. What complicates
the issue for the low-weight-capacity robots is that the rated capacity includes the weight of
the end effector. For example, if the gripper for the PUMA 250 weighs lib, the net capacity of
the robot is only 1.5 lb.
43
ROBOT TECHNOLOGY
AM/JA
Manual method
This method is not really programming in the conventional sense of the word. It is
more like setting up a machine rather than programming. It is the procedure used for the
simpler robots and involves setting mechanical stops, cams, switches, or relays in the robot's
control unit. For these low-technology robots used for short work cycles (e.g., pick-and-place
operations), the manual programming method is adequate.
Walkthrough method
In this method the programmer manually moves the robot's arm and hand through
the motion sequence of the work cycle. Each movement is recorded into memory for
subsequent playback during production. The speed with which the movements are performed
can usually be controlled independently so that the programmer does not have to worry about
the cycle time during the walkthrough. The main concern is getting the position sequence
correct. The walkthrough method would be appropriate for spray painting and arc welding
robots.
Leadthrough method
The leadthrough method makes use of a teach pendant to power drive the robot
through its motion sequence. The teach pendant is usually a small hand-held device with
switches and dials to control the robot's physical movements. Each motion is recorded into
memory for future playback during the work cycle. The leadthrough method is very popular
among robot programming methods because of its ease and convenience.
Off-line programming
This method involves the preparation of the robot program off-line, in a manner
similar to NC part programming. Off-line robot programming is typically accomplished on a
computer terminal. After the program has been prepared, it is entered into the robot memory
Department of Mechanical Engineering, AJCE
44
ROBOT TECHNOLOGY
AM/JA
for use during the work cycle. The advantage of off-line robot programming is that
production time of the robot is not lost to delays in teaching the robot a new task.
Programming off-line can be done while the robot is still in production on the preceding job.
This means higher utilization of the robot and the equipment with which it operates.
Another benefit associated with off-line programming is the prospect of integrating
the robot into the factory CAD/CAM data base and information system. In future
manufacturing systems, robot programming will be performed by advanced CAD/CAM
systems, just as NC part programs can be generated by today's CAD/CAM technology.
45
ROBOT TECHNOLOGY
AM/JA
description of the command and one or more examples showing how it would be entered.
The Program Instructions are a set of statements used to write robot programs.
Programs in VAL direct the sequence of motions of the PUMA. One statement usually
corresponds to one movement of the robot's arm or wrist. Examples of Program Instructions
include:
Move to a point.
Move to a point in a straight-line motion.
Open gripper.
Close gripper.
The Program Instructions are entered into memory to form programs by first using
the Monitor Command EDIT. This prepares the system to receive the Program Instruction
statements in the proper order. Some of the important Program Instructions are given in
Table. Each instruction is described and examples are given to illustrate typical usage.
END EFFECTORS
In the terminology of robotics, an end effector can be defined as a device which is
attached to the robot's wrist to perform a specific task. The task might be workpart handling,
spot welding, spray painting, or any of a great variety of other functions. The possibilities are
limited only by the imagination and ingenuity of the applications engineers who design robot
systems. (Economic considerations might also impose a few limitations.) The end effector is
the special-purpose tooling which enables the robot to perform a particular job. It is usually
custom engineered for that job, either by the company that owns the robot or by the company
that sold the robot. Most robot manufacturers have engineering groups which design and
fabricate end effectors or provide advice to their customers on end effector design.
For purposes of organization, we will divide the various types of end effectors into
two categories: grippers and tools. The following two sections discuss these two categories.
Grippers
Grippers are used to hold either workparts (in pick-and-place operations, machine
loading, or assembly work) or tools. There are numerous alternative ways in which the
gripper can be designed. The most appropriate design depends on the workpart or substance
being handled. The following is a list of the most common grasping methods used in robot
grippers:
Department of Mechanical Engineering, AJCE
46
ROBOT TECHNOLOGY
AM/JA
Sample
gripper
action
designs:
(b)
slide
gripper;
(d)
vacuum-operated hand.
(a)
double
pivot
gripper-pivot
action
action
gripper;
mechanism;
47
ROBOT TECHNOLOGY
AM/JA
Spray painting gun
Drilling spindle
Routers, grinders, wire brushes
Heating torches
48
ROBOT TECHNOLOGY
AM/JA
cell controller would have to make sure that certain steps are completed before subsequent
steps are initiated. For example, the machine tool must finish processing the workpart before
the robot attempts to reach in and grasp the part for unloading. Similarly, the machine cycle
must not begin until the robot has loaded the raw workpiece and removed its arm. The robot
cannot pick up the raw part from the incoming conveyor unless and- until the part has been
positioned for gripping. 1be purpose of the work cell controller in this example is to ensure
that the work elements are sequenced correctly and that each step is finished before the next
one begins.
49
ROBOT TECHNOLOGY
AM/JA
sophisticated work cells) are:
4. Making logical decisions.
5. Performing computations.
50
ROBOT TECHNOLOGY
AM/JA
ROBOTIC SENSORS
For certain robot applications, the type of workstation control using interlocks is not
adequate. The robot must take on more humanlike senses and capabilities in order to perform
the task in a satisfactory way. These senses and capabilities include vision and hand-eye
coordination, touch, and hearing. Accordingly, we will divide the types of sensors used in
robotics into the following three categories:
1. Vision sensors
2. Tactile and proximity sensors
3. Voice sensors
Vision sensors
This is one of the areas that is receiving a lot of attention in robotics research.
Computerized visions systems will be an important technology in future automated factories.
Robot vision is made possible by means of a video camera, a sufficient light source, and a
computer programmed to process image data. The camera is mounted either on the robot or in
a fixed position above the robot so that its field of vision includes the robot's work volume.
The computer software enables the vision system to sense the presence of an object and its
position and orientation. Vision capability would enable the robot to carry out the following
kinds of operations:
Retrieve parts which are randomly oriented on a conveyor.
Recognize particular parts which are intermixed with other objects.
Perform visual inspection tasks.
Perform assembly operations which require alignment.
All of these operations have been accomplished in research laboratories. It is merely
a matter of time and economics before vision sensors become a common feature in robot
applications.
Tactile and proximity sensors
Tactile sensors provide the robot with the capability to respond to contact forces
between itself and other objects within its work volume. Tactile sensors can be divided into
two types:
1. Touch sensors
Department of Mechanical Engineering, AJCE
51
ROBOT TECHNOLOGY
AM/JA
2. Stress sensors (also called force sensors)
Touch sensors are used simply to indicate whether contact has been made with an
object. A simple microswitch can serve the purpose of a touch sensor. Stress sensors are used
to measure the magnitude of the contact force. Strain gage devices are typically employed in
force-measuring sensors.
Potential uses of robots with tactile sensing capabilities would be in assembly and
inspection operations. In assembly, the robot could perform delicate part alignment and
joining operations. In inspection, touch sensing would be useful in gauging operations and
dimensional-measuring activities. Proximity sensors are used to sense when one object is
close to another object. On a robot, the proximity sensor would be located on or near the end
effector. This sensing capability can be engineered by means of optical-proximity devices,
eddy-current proximity detectors, magnetic-field sensors, or other devices.
In robotics, proximity sensors might be used to indicate the presence or absence of a
workpart or other object. They could also be helpful in preventing injury to the robot's human
coworkers in the factory.
Voice sensors
Another area of robotics research is voice sensing or voice programming. Voice
programming can be defined as the oral communication of commands to the robot or other
machine. (Voice programming is also used in C part programming and the reader is invited to
refer back to Section 8.9 for a description of this interesting application.) The robot controller
is equipped with a speech recognition system which analyzes the voice input and compares it
with a set of stored word patterns. When a match is found between the input and the stored
vocabulary word, the robot performs some action which corresponds to that word.
Voice sensors would be useful in robot programming to speed up the programming
procedure, just as it does in NC programming. It would also be beneficial in especially
hazardous working environments for performing unique operations such as maintenance and
repair work.
52
ROBOT TECHNOLOGY
AM/JA
Make sure that u have read all the topics once, dont go for
half chances in CAD/CAM as this is the subject that you can
score maximum marks
Before studying for exam, go through the previous year
question papers and be sure with the exam patten. U can see
that each module has a question of 20 Marks with an option
of 2 or 3
While studying for exam, plan ur answers and study. Refer
question paper and study all the questions that has ever asked
for exam. Dont skip any.
Plan the questions for say 5 marks, 10 marks and 20 marks,
using commen sense. Some questions wont be asked for 20
marks any way, but some that has asked for 5 marks can also
be asked for 10 or 20 marks.
Dont waste your study leave, manage them properly and
study
While writing exam, try to answer every question with some
sort of figure, plz dont take it silly, as its best way to score
maximum marks.
At least, write
o 5 Mark question- 1.5 pages
o 7or 8 Mark question-2.5 pages
o 10 Mark question-3 pages
o 20 Mark question- 5-6 pages
Take 30- 40 minutes for each essay question. And dont take
more than that. Before u start writing, just have a quick
thought of what you are going to write.
Give explanation for program, if it carries more than 5
marks.
53