5th Module
5th Module
5th Module
1. INTRODUCTION
Robot must be programmed to teach the robot the particular motion sequence and other
actions that must be performed in order to accomplish its task. A robot program can be
considered as a path in space that is to be followed by the manipulator, combined with
peripheral actions that support the work cycle. It can be defined as a sequence of joint
coordinate positions.
2. METHODS OF ROBOT PROGRAMMING
To program a robot, specific commands are entered into the robot’s controller memory. This
is done in several ways; one of which is the manual programming method used for limited
sequence robots i.e., robots have short work cycles. Here programming is done by setting
limit switches and mechanical stops to control the end points of its motions. A sequencing
device determines the order in which each joint is actuated to form the complete motion
cycle.
• Leadthrough programming.
• Textual (or) computer like programming languages.
• Off-line programming.
Here the manipulator is driven through the various motions needed to perform a given task,
recording the motions into the robot’s computer memory for subsequent playback. Based on
the teach procedure, lead through programming can be distinguished into two as
In powered leadthrough, the user would guide the robot through interaction with a Teach
Pendant. The teach pendant is a hand-held control box that allows control of each
manipulator joint or of each cartesian degree of freedom. It consists of toggle switches, dials
and buttons which the programmer activates in a coordinated fashion to move the
manipulator to the required positions in the workplace. The important components of a teach
pendant are illustrated in the Fig. 1.
1
Fig. 1: Teach Pendant
The powered leadthrough is most commonly used nowadays and is usually limited to point to
point motions (like spot welding, machine loading and unloading) rather than continuous
movement. This is due to the difficulty in using the teach pendant to regulate complex
geometric motions in space.
The manual leadthrough method or walkthrough method requires the operator to physically
move the manipulator through the motion sequence. It is convenient for continuous path
programming where the motion cycle involves smooth complex curvilinear movements of the
robot arm. Spray painting and continuous arc welding are examples of this type of robot
application.
In this method since the programmer has to physically grasp the robot arm and end-effector it
could be difficult to move through the motion sequence in the case of large robots. So, a
special programming device which has the same joint configuration as the actual robot is
substituted for the actual robot. The closely spaced motion points are recorded into the
controller memory and during playback, the path is recreated by controlling the actual robot
arm through the same sequence of points.
2
Advantages of Leadthrough Programming:
Disadvantages:
This method of robot programming involves the use of a programming language similar to
computer programming. The textual language apart from the various capabilities of a
computer programming language, also includes statements specifically designed for robot
control like motion control and input / output.
Motion control commands are used to direct the robot to move its manipulator to some
defined position in space while the input/output commands are used to control the receipt of
signals from sensors and other devices and to initiate control signals to other pieces of
equipment in the workcell.
These robot languages use offline / online methods of programming i.e. the program is
written off-line with the textual language to define the logic and sequence while the teach
pendant is used to define on-line, the specific point locations in the workspace. The
advantages of textual programming over lead-through programming include
• Extended program logic.
• Enhanced sensor capabilities.
• Improved output capabilities for controlling external equipment.
• Computations and data processing capabilities.
• Communication with other computer systems.
Here, the programs can be developed without needing to use the robot, i.e. there is no need to
physically locate the point positions in the work space for the robot as required with textual
and leadthrough programming. The robot program can be prepared at a remote computer
terminal and down loaded to the robot controller for execution without interrupting
production. This saves production time lost to delays in teaching the robot a new task. The
programs developed off-line can be tested and evaluated using simulation techniques.
3
• Higher utilization of the robot and the equipment with which it operates as off-
line programming can be done while the robot is still in production on the
preceding job.
• The sequence of operations and robot movements can be optimized or easily
improved.
• Existing CAD data can be incorporated.
• Enables concurrent engineering and reduces production time.
• Programs can be easily maintained and modified.
The manipulator of a robot is made up of a sequence of link and joint combinations. The
links are rigid members connecting the joints. The joints, sometimes also referred to as the
axes, are the movable components of the robot that cause relative motion between the
adjacent links. The manipulator consists of two sections
• an arm and body, and
• a wrist.
An end-effector is attached to the wrist, and a robot program can be considered as the path in
space through which the end effector is to be moved by the robot. The arm and body
determine the general position of the end effector in the robot’s work space while the wrist
determines its orientation. The robot is required to move its joints (axes) through various
positions in order to follow that path.
If we consider a point in space in the robot program as a position and orientation of the end
effector, there is more than one possible set of joint co-ordinate values that can be used for
the robot to reach that point. [Refer Fig. 3]. Therefore, o the specification of a point in space
does not uniquely define the joint coordinates of the robot but the specification of the joint
4
coordinates of the robot defines only one point in space, so, the robot program definition can
be refined as ‘a sequence of joint coordinate positions’. This way, the position and orientation
of the end effector at each point in the path are specified simultaneously.
The different methods by which the programmer moves the manipulator to the required
positions in the workspace are:
• Joint mode.
• World coordinate mode (or x − y − z method)
• Tool coordinate mode.
In manual leadthrough, the programmer simply moves the arm through the required path to
create the program whereas in the powered leadthrough the programmer uses a teach pendant
to drive the manipulator. The teach pendant is equipped with a set of toggle switches or
contact buttons to operate each joint in either of its two directions until the end effector has
been positioned to the desired point. Successive positioning of the robot arm in this way
defines a sequence of points. This method is referred to as the joint mode.
However, this way of coordinating the individual joints with the teach pendant can be very
tedious and time consuming. Therefore, to overcome the difficulties, two alternate methods
called the world coordinate mode and tool coordinate mode are used for controlling
movement of the entire manipulator during programming, in addition to controls for
individual joints. Both these methods make use of a cartesian coordinate system, where the
programmer can move the robot’s wrist end in straight line paths. For polar, cylindrical and
jointed arm robot, the controller must solve a set of mathematical equations to convert the
rotational joint motions of the robot into cartesian coordinate system. To the programmer, the
end-effector is being moved in motions that are parallel to the x, y and z axes.
The world coordinate mode allows the wrist location to be defined with origin at some
location in the body of the robot. It is illustrated in Fig. 4.
5
Fig. 4.
In the tool coordinate mode, the alignment of the axis system is defined relative to the
orientation of the wrist face plate, to which the end effector is attached. Here the origin is
located at some point on the wrist, the xy-plane is oriented parallel to the wrist faceplate and
the z-axis is perpendicular to the faceplate pointing in the same direction as a tool or end-
effector. The programmer can orient the tool in the desired way and then control the robot to
make linear moves in directions parallel or perpendicular to the tool. Hence, this method
could be used to provide a driving motion of the tool.
5. MOTION INTERPOLATION
Interpolation is the method of constructing new data points within the range of a discrete set
of known data points. Consider programming a two-axis servo controlled Cartesian robot
with eight addressable points for each axis. Then there would be 64 addressable points which
can be used in any program. The work space is illustrated in the Fig. 5.
6
An addressable point is one of the available points that can be specified in the program so
that the robot can be commanded to go to that point. For example, a program for the robot to
start in the lower left corner and traverse the perimeter of a rectangle would be as follows:
Fig. 6
Now, if a step is removed from the programs say step 3, then the robot would execute step 4
by tracing a path along the diagonal line from point (8, 1) to point (1, 8). Refer Fig. 7. This
process is referred to as interpolation.
In joint interpolation, for the robot to move its wrist end between two points, the controller
determines how far each joint must move. Then it actuates each of the joints simultaneously
such that all the joints start and stop at the same time.
7
In straight line interpolation, the robot controller calculates the sequence of addressable
points in space through which the robot wrist end must pass to achieve a straight-line path
between two points.
A Cartesian robot has only linear axis and hence in its case both joint interpolation and
straight line interpolation are the same (i.e., both create a straight-line approximation).
The approximation would be better with a denser grid and much larger number of
addressable points.
In joint interpolation, usually less total motion energy is required to make the move than
straight line interpolation thereby move could be made in slightly less time. For most robots,
joint interpolation is the default procedure used unless the programmer specifics some other
type of interpolation.
For robots with rotational joints or with a combination of rotational and linear joints, straight
line interpolation produces a path that is different from joint interpolation.
Considering a robot having one rotational axis and one linear axis with each axis having eight
addressable points, so we get a grid of 64 addressable points as shown in Fig. 9.
8
Here, from the viewpoint of euclidean geometry, the moves created during interpolation are
of different lengths. In the Fig. 9 this is shown with the move from (1, 1) to (3, 2) and the
move from (1, 6) to (3, 7).
Fig. 9: Robot Workspace with one Rotational and one Linear Axis
The incremental moves executed by the robot is a combination of rotational moves (along
axis 1) and linear moves (along axis 2).
Irregular smooth motions refer to an interpolation process used in manual lead through
programming, when the movements involved typically consist of combinations of smooth
motion segments. The robot must follow the sequence of closely spaced points that are
defined during the programming procedure. This is used in applications such as spray
painting.
Almost all industrial robots can be instructed to send signals or wait for signals during the
execution of a program. These signals are often referred to as interlocks. One common form
of interlock signals is to actuate the robot’s end-effector like a gripper where the signal is to
open or close the gripper. This type of signals are usually binary i.e. the signal is ON/OFF or
high level / low level and are implemented by using one or more dedicated lines.
9
Some commands are:
For example, let us consider a two-axis robot with workspace of 8 × 8 addressable points. Its
task is to unload a press. The robot must remove the parts from the platen (located at 8, 8)
and drop them in a tote pan (located at 1, 8). Here, (Refer Fig. 10) the robot must move its
arm around the near side of the press column (by making use of point 8, 1 and 1, 1) in order
to avoid colliding with it. The point 1, 1 will be the safe starting portion and the point 8, 1
will be the waiting position of the robot arm before entering the press to remove the part.
Controller ports 1 to 10 will be used as output (SIGNAL) lines and ports 11 to 20 as input
(WAIT) lines. Here, output line 4 will be used to actuate the press, output line 5 to close the
gripper and output line 6 to open the gripper. Indication that the press has opened (WAIT)
will be through the input line 11.
Also, to cause the robot to wait for a specified amount of time to ensure that the operation
had taken place before proceeding to the next step, the DELAY command is used. The steps
given below explain the press unloading application where the gripper is in the open position
to begin with.
MOVE DESCRIPTION
1,1 Start at home position.
8, 1 Go to wait position.
WAIT 11 Wait for press to open.
8, 8 Go to pickup point.
SIGNAL 5 Actuate gripper to close.
10
DELAY 1 SEC Wait for gripper to close.
8, 1 Go to safe position.
SIGNAL 4 Signal press that arm is clear.
1, 1 Go around the press column.
1, 8 Go to tote pan.
SIGNAL 6 Actuate gripper to open.
DELAY 1 SEC Wait for gripper to close.
1, 1 Go to home portion.
7. BRANCHING
Branching is a method of dividing a program into convenient segments that can be called one
or more times and can be executed during the program. A Branch can be considered as a
subroutine that can be executed either by branching it at a particular space in the program or
by testing an input signal line to branch to it.
Textual programming languages widely used in digital computers took over the control
function in robotics. The increasing complexity of the tasks that the robots were expected to
perform with the need to imbed logical decisions into the robot workcycle stimulated the
growth of these languages. Some of the textual robot languages developed over the years
are.
11
LANGUAGE DEVELOPED BY
WAVE Stanford Artificial Intelligence
laboratory.
AL Stanford Artificial Intelligence
laboratory.
VAL Victor Scheinman
(Victor’s Assembly language) used in PUMA robot series by
Unimation, Inc.
AUTO PASS IBM Corporation.
AML
RAIL Automatix
MCL McDonnell − Douglas under US.
(Machine control language) Air Force sponsorship.
HELP DEA, Italy, Licensed to General
Electric company.
These the textual robot languages provide a variety of structures and capabilities and can be
grouped into three major classes as:
• First generation languages.
• Second generation languages.
• Future generation languages.
These languages use a combination of off-line programming (i.e. command statements) and
teach pendant programming. Since these languages were developed largely to implement
motion control, they are also called as ‘motion level’ languages. The capabilities of first
generation languages are similar to the advanced teach pendant methods. The features include
ability to define manipulator motions, handling elementary sensor data like ON/OFF signals,
branching, input/output interfacing and opening and closing of the end-effectors.
An example of the first-generation language is VAL. It is designed with simple syntax and is
capable of illustrating the robot functions very easily. It was mainly adopted for Unimation
robots. The limitations of first generation languages include
• The inability to specify complex arithmetic computations.
• The incapability to use complex sensors and sensor data.
• Limited capacity to communicate with other computers.
• Incapability of extension for future enhancements.
12
8.2. Second Generation Languages:
Second generation languages are structured programming languages which overcome the
limitations of the first-generation languages. These are similar to computer programming
languages and can accomplish more complex tasks.
These languages are also called world modeling, ‘model based’ languages and ‘task oriented’
object level languages. In this concept, the robot possesses knowledge of the three-
dimensional model of its work space by inputting data into its control memory or by
providing it with the capacity to see the work environment and properly interpret what it sees.
By this, the robot knows the desired locations without being taught each point and is capable
of self-programming to perform a task based on a stated objective. Examples of such high-
level objective oriented commands would be like ‘TIGHTEN A NUT’ OR ‘ASSEMBLE
THE TYPE WRITER’. Current limitations of Future generation languages would include:
• Accuracy of the world model contained in the robot’s memory.
• Technology of artificial intelligence and hierarchical control systems that would
permit a robot to accept an objective oriented command and translate it into a
step-by-step procedure to accomplish it.
9. STRUCTURE OF ROBOT LANGUAGE
We have discussed in earlier sections that it is difficult to have close control through pendant
teaching and so textual programming is attempted, where the computer instructions are given
following the syntax of certain robot language. A robot language must be able to support the
programming of the robot, control the robot manipulator interface with sensors and
13
equipment and support data communications with other computer systems in the company.
This is illustrated in the Fig. 11.
This is used to perform several functions like writing, editing, or executing a program in the
robot textual languages. The term operating system in computer science, refers to the
software that supports the internal operation of the computer system. It facilitates the
operation of the computer by the user and increases the efficiency of the system and
associated peripheral devices.
The purpose of a monitor mode is to control the complete operating system. This mode
allows the users to carry out important tasks like:
• Defining the positions with the help of a teach pendant.
• Entering the sufficient speed for operating a robot.
• Storing programs in the memory.
• Transfer the stored programs to robot controller memory.
• Bringing back the existing program for performing other tasks like edit and run.
14
Run mode or Execute mode:
The run mode is used to execute the sequence of instructions in the program. This mode helps
in checking the errors available on the program. These errors are corrected with the help of
language debugging methods. For example: the points defined in the program may exceed the
limits of moving the manipulator. In such case, an error message will be displayed on the
screen. To correct this error, the program will be sent back to the edit mode for corrections.
Edit mode:
In the edit mode, the programmer can write new programs or edit existing programs. There is
an instruction set for writing and editing the programs which can be done by three different
methods such as:
• Editing or deleting the instruction in existing program.
• Writing new series of instruction lines in a program.
• Adding of new lines in the program.
9.2. Elements and Functions of a Robot Language:
The basic elements and functions that should be incorporated into a robot language to enable
the robot to perform various tasks are:
• Constants, variables and other data objects.
• Monitor commands.
• Motion commands.
• End effector and sensor commands.
• Program control and subroutines.
• Computations and operations.
• Communications and data processing.
Some of these are discussed in the following sections with respect to VAL programming.
VAL is a robot programming language and operating system developed by Unimation, Inc.
for its PUMA series industrial robots. It is a compact standalone system designed to be highly
interactive to minimize programming time and to provide as many programming aids as
possible. The motions and actions of the robot are controlled by a program created by the
user and stored in RAM. These control programs are called user programs or VAL programs.
Also, subroutines which are separate programs can be included in the VAL program. A
subroutine can call other subroutines up to ten such levels possible. VAL was later upgraded
to VAL II.
It provides the capability to easily define the task a robot is to perform. Also, it includes the
ability to respond to information from sensor systems such as machine vision, enhanced
performance in terms of arm trajectory generation and working in unpredictable situations or
using reference frames. VAL contains an easy to use program editor that allows the user to
create or to modify robot control programs. The program modification facilities include the
15
ability to insert new program steps, to delete old steps and to replace all or part of existing
steps.
Robot locations refer to the data that represents the position and orientation of the robot tool.
A ‘point’ or a ‘position’ is a cartesian reference in the workspace. A ‘location’ is a point plus
an orientation. While executing a motion instruction, the robot tool point moves to the
specified destination point and the tool frame is oriented to the specified destination
orientation.
When a location is expressed in terms of the positions of the individual robot joints, then it is
called a precision point. Here, the advantage is that maximum precision can be obtained
without any ambiguity regarding the robot configuration but they cannot be used for other
robot structures (i.e. robot dependent) and cannot be modified. Transformations is a robot
independent representation of position and orientation for the tool. The location values are
expressed in terms of the Cartesian coordinates and orientation angle of the robot tool relative
to a reference frame fixed in the robot base. Also, relative transformations called compound
transformations are available in VAL which define a location relative to other locations and
are written as strings of transformation names separated by colons. The advantage is that they
can be used with other robot and can be modified by shifting a position or an angle.
Path Control: VAL uses straight line interpolation and joint interpolation methods to control
the path of a robot from one location to another. In straight line interpolation, the motion
speed of the robot tool tip can be accurately controlled but is slower than the corresponding
joint − interpolated motions.
There are programming commands used to define the motion path. Usually textual statements
are used to describe the motion while the leadthrough methods are used to define the position
and orientation of the robot during and / or at the end of the motion. Some specific
commands used in VAL II are discussed below.
HERE P1 (or) LEARN P1 : These statements are used to define the desired point P1
and record that point into memory (i.e. the set of joint
positions or co-ordinates used by the controller to define
the point). Either powered leadthrough or manual
leadthrough is used to place the robot at the desired point.
16
defined by the variable name P1.
Other variants of the MOVE statement include the definition of straight line interpolation
motions, incremental moves, approach and depart moves and paths.
DEPART : This statement moves the gripper away from the point
after the pickup is made.
The approach and depart statements are used in material handling operations. Let as consider
the following sequence.
APPRO P1, 40
MOVE P1
SIGNAL (to close gripper)
DEPART 40
In the above sequence, the approach command moves the gripper to a safe distance of 40 mm
above the destination point. The orientation of the gripper is the same as that defined for the
point P1. The MOVE command moves the tool to the point P1 and the DEPART command
moves the tool away from P1 by 40 mm.
APPROS and DEPARTS carry out the same instruction but along straight line paths.
A series of points connected together in a single move is a path in a robot program. The path
can be specified as follows:
17
The above defined path consists of the connected series of points P1, P2, P3, P4, defined
relative to the robot’s world space.
SPEED command is used to control robot speed by defining either a relative velocity or an
absolute velocity. The two ways to specify speed are:
SPEED 70
The manipulator should operate at a percentage of speed specified (here, 70%) of the initial
commanded velocity.
SPEED 10 MMPS
This statement indicates that the motion commands are to be executed at a speed of 10 mm/s.
The concept of frame definition in robot programming is conveyed through the following
statement.
The position of FRAME 1 in space is defined using the three points P1, P2 and P3. P1 would
be the origin of the frame, P2 is a point along the x-axis and P3 is a point in the xy plane.
DRIVE This command can be used to change a single joint by a certain amount
DRIVE 3, 65, 30
This statement changes the angle of joints by driving it 65° in the positive direction at 30
percent of the monitor speed.
ALIGN : This command is used to align the tool or end effector for
subsequent moves such that its z-axis is aligned parallel to
the nearest axis of the world coordinate system.
We have discussed previously about the SIGNAL command to operate the gripper. Better
ways of exercising control over the end effector operation are available in second generation
languages. The basic commands are
OPEN
CLOSE
The above two commands cause the action to occur during execution of the next motion. If
the execution is to take place immediately rather than during the next motion, the following
commands are to be used.
18
OPENI
CLOSEI
The above statements are for a non-servoed or pneumatically operated gripper. VAL II has
provisions for controlling an electrically driven servoed hand also. Here greater control can
be achieved, for instance by the following ways.
OPEN 65
This statement causes the gripper to open to 65 mm during the next motion of the robot
CLOSEI 40
If a check has to be made to determine if the gripper has closed by an expected amount, the
GRASP command can be used. For example,
The above statement closes the gripper and checks if the opening is less than 11.5 mm. If
true, the program branches to statement 110 in the program. In case the statement number is
not specified in the command, the system displays an error message.
Some grippers have tactile and/or force sensors built into the fingers to permit the robot to
sense the presence of the object and to apply a measured force during grouping.
For example,
CLOSE 4.0 LB
To accomplish in a single statement, the control of the servo controlled gripper with the
simultaneous movement of the robot arm, is
MOVET P2, 80
This causes a joint interpolated motion from the current position to the point P2 and during
the motion also actuates the hand opening to 80 mm.
MOVEST P2, 80
For a pneumatically operated gripper, the above commands mean ‘open’ if the value is
greater than zero and ‘close’ if the value is otherwise.
19
10.4. Sensor and Interlock Commands:
SIGNAL 4, ON
This statement would allow the signal from output port 4 to be turned on
SIGNAL 4, OFF
SIGNAL − 2, 4
This would turn output signal 2 ‘off’ and output signal 4 ‘on’. i.e., the negative numbers turn
the corresponding signals ‘on’ and the positive numbers turn the corresponding signals ‘off’.
This gives an output of 5.5 units (probably volts) to the device from controller output port
105.
The WAIT command can also be used for on − off conditions in the same manner as the
SIGNAL command. The WAIT command is used to verify whether the device has been
turned ‘on’ or ‘off’ before permitting the program to continue. For example, it is useful in a
situation where the robot needs to wait for the completion of an automatic machine cycle for
loading and unloading application.
WAIT 20, ON
would cause program execution to stop until the input signal coming to the robot controller at
port 20 is in ‘on’ condition.
WAIT SIG ( − 1, 2)
stops program execution until external (input) signal 1 is turned ‘off’ and input signal 2 is
turned ‘on’.
RESET This turns off all external output signals. Used in the initialization portion of a
program to ensure that all external signals are in a known state- ‘off ’.
20
REACT 11, SAFETY
indicates that the input line 11 is to be continuously monitored. If the current state of signal is
‘off’, the signal is monitored for a transition from ‘off’ to ‘on’ and then again ‘off’. When the
change is detected, REACT transfers program control to the subroutine SAFETY.
Usually REACT completes current motion command before interrupting. In cases where
immediate action is required, the following statement is used.
REACTI.
This interrupts robot motion immediately and transfer to the subroutine is done at once.
21
Example-2: Program for palletizing.
Y
30
2
Row
Pallet 40
X
1 2 3 4 5
Column
Given Data:
Pallet Variables
ROW: integer ROW count
COLUMN: integer COLUMN count
X: coordinate value along x-axis
Y: coordinate value along y-axis
Locational Constants
PICK-UP: point of pick-up of objects
CORNER: start of point in the pallet
Locational Variables
DROP: point of dropping
22
coordinate)
References:
23