ROBOTICS AND AUTOMATION
Module-4
Robot Programming:
Modern robots are highly advanced, capable of more than just basic movements. They can
process input from sensors, interact with other equipment, make decisions, and communicate
with computers for instructions and reporting. All these functions depend on programming.
Methods of robot programming:
Robot programming is done in two main ways.
1. Lead-through methods
2. Textual robot languages
These methods align with current industrial practices.
Lead-through methods involve manually guiding the robot through its motion path,
which the robot then memorizes. Known as "teach-by-showing," these methods were the first
used in industry, starting in the early 1960s.
Textual robot programming, like computer programming, uses high-level, English-like
languages typed on a monitor. This approach, often combined with leadthrough techniques for
point location, began developing in the 1970s, with the first commercial language appearing
around 1979.
lead -through programming methods:
In leadthrough programming, the robot is guided through its motion path to record it into the
controller's memory. There are two methods to achieve this.
1. Powered leadthrough
2. Manual leadthrough
Powered leadthrough programming uses a teach pendant, a handheld control box with
switches and buttons, to guide the robot's joints and record points in memory. This method,
common in industrial applications, is best for point-to-point movements rather than continuous
1
motions due to its complexity. It's widely used for tasks like part transfer, machine
loading/unloading, and spot welding.
Manual leadthrough, or the "walkthrough" method, is ideal for continuous-path
programming involving smooth, complex movements, such as spray painting or arc welding.
The programmer physically guides the robot arm through the desired motion, recording each
point into memory. If the robot is too large to handle, a special programming apparatus with
similar geometry is used. A teach button on the robot or apparatus is pressed to record the
desired movements, creating a detailed path of hundreds or thousands of points.
Leadthrough control systems have two modes: teach mode for programming the robot
and run mode for executing the program. These methods, developed over the last 20 years, are
simple and effective for teaching robots to perform repetitive tasks in factories. They require
relatively low skill levels from programmers and are easy to apply in industrial settings.
A robot program as a path in space:
A robot program is defined as a path in space, representing the sequence of positions
the robot's wrist and end effector will move through. For robots with multiple joints (axes),
each point in the path includes coordinate values for each joint. Robots have different
anatomies (polar, cylindrical, cartesian, jointed arm), each with specific axes for the arm, body,
and wrist that determine the end effector's position and orientation. Multiple sets of joint
coordinates can achieve the same point in space as shown in figure 8.1.
To define a sequence of points in space, we assume points are specified by joint
coordinates. For simplicity, consider programming a Cartesian robot with two axes and two
addressable points per axis. An addressable point is a specific location the robot can reach.
2
Figure 8.2 illustrates the four possible points in the robot's rectangular workspace. A program
to move the robot from the lower left-hand corner around the perimeter of the rectangle can
be created based on these points.
In this example, the points are designated by their x, y coordinates in a Cartesian system. For
a robot with two orthogonal slides and two addressable points per axis, the spatial points
correspond directly to the joint coordinate values.
The second program differs from the first by omitting the point at (2,2). In the first
program, only one joint moved at a time between points. In this second program, moving from
3
point (2,1) to (1,2) requires both joints to move. The robot could either move both joints
simultaneously, tracing a diagonal path, or move one joint at a time, tracing a path along the
rectangle's border, potentially passing through points (2,2) or (1,1).
Determining the robot's path between two points is crucial for proper motion planning,
but there is no universal rule. Limited-sequence non-servo robots, programmed manually,
often move both joints simultaneously, resulting in a slow diagonal path. In contrast, other
limited-sequence robots move their joints sequentially.
Robots that move one axis at a time typically start with the lower-numbered axes,
making the path through point (2,2) likely. There are no industry standards, so programmers
must consult the user manual or experiment. Servo-controlled robots, programmed by
leadthrough or textual methods, usually move all axes simultaneously, following a diagonal
path. Figure 8.3 illustrates these path differences.
In Example 8.2, programmers can make some robots pass through points without
explicitly programming them. The robot will move through these points without stopping, as
they are not addressable points in the program.
Methods of Defining Positions in Space:
Irrespective of robot configuration, there are several methods that can be used by the
programmer during the teach mode to actuate the robot arm and wrist. We list the following
three methods:
1. Joint movements
4
2. x-y-z coordinate motions (also called world coordinates)
3. Tool coordinate motions
The first method of programming a robot involves manually moving each joint using a
teach pendant, a time-consuming process called the joint mode.
To simplify this, many robots use the world coordinate system, where the end effector's
position is defined using an x-y-z coordinate system. This system allows for easier
programming by converting joint movements into Cartesian coordinates. The controller
performs necessary computations, and the wrist is usually kept in a constant orientation. Figure
8.4 illustrates this method for a jointed-arm robot.
Some robots can define tool coordinate motions, where the origin is at the wrist and the
coordinate system is aligned with the tool's orientation. The z-axis points in the tool's direction,
allowing for precise tool movement. This method requires significant computations by the
controller to simplify programming for the user.
Reasons for Defining Points in a program:
The two main reasons for defining points in a program are:
5
1. To define a working position for the end effector
2. To avoid obstacles
The first category involves programming the robot to perform tasks like picking up parts or
spot-welding at specific locations, including defining safe positions in the workspace. The
second category defines points in space to prevent the robot from colliding with obstacles such
as machines and conveyors, ensuring safe navigation around them.
Speed Control:
Most robots allow their motion speed to be regulated during program execution using dials on
the teach pendant. It's good practice to operate the robot at slower speeds when near obstacles
and at higher speeds in clear areas, creating "freeways" for unobstructed, faster movement.
For robots programmed by leadthrough methods, speed is not typically specified as linear
velocity because it depends on factors like which axes are moving, the robot's axis
configuration, and the load being carried. These factors add complexity to programming the
control computer to determine the end effector's speed.
Motion interpolation:
Motion interpolation in robotics refers to the method of creating smooth and continuous
movement between defined points (known as waypoints or control points) in a robot's path.
This technique ensures that the robot moves efficiently and accurately from one point to
another without abrupt changes in speed or direction.
Illustration: When programming a two-axis servo-controlled Cartesian robot with eight
addressable points per axis, there are 64 possible addressable points available for any program.
Figure 8.6 illustrates the work volume. Assuming the same axis sizes as the previous limited
sequence robot, a program can be written to perform the same work cycle as in Example 8.1.
6
If step 3 is removed, the servo-controlled robot would execute step 4 by moving diagonally
from point (8,1) to point (1,8), a process called interpolation.
On many robots, the programmer can specify which type of interpolation scheme to use. The
possibilities include:
1. Joint interpolation
2. Straight line interpolation
3. Circular interpolation
4. Irregular smooth motions (manual leadthrough programming)
Joint interpolation:
Joint interpolation refers to a method in robotics where each joint of a robot arm moves
from its starting position to its target position independently and simultaneously. This means
that each joint may move at a different speed and take different paths, but all joints aim to
reach their respective target positions at the same time.
In joint interpolation, the controller calculates how much each joint needs to move to go
from the starting point to the next point in the program. It identifies the joint that will take the
7
longest time to move and uses this time to determine the overall duration of the move. The
controller then breaks down the movement into smaller steps so that all joints start and stop at
the same time.
Illustration 1:
For example, if moving from point (1,1) to point (7,4) on a grid, joint 1 needs to move six
steps and joint 2 needs to move three steps. The controller sets intermediate points along this
path for the robot to follow, ensuring a smooth movement from the start to the end point. The
following program illustrates the process:
Illustration 2:
Imagine a robot arm with three joints (shoulder, elbow, and wrist) that needs to move from an
initial position (Position 1) to a target position (Position 2).
1. Initial Position (Position 1):
8
o Joint 1: 30 degrees
o Joint 2: 45 degrees
o Joint 3: 60 degrees
2. Target Position (Position 2):
o Joint 1: 60 degrees
o Joint 2: 90 degrees
o Joint 3: 120 degrees
With joint interpolation, each joint moves independently:
• Joint 1 moves from 30 degrees to 60 degrees.
• Joint 2 moves from 45 degrees to 90 degrees.
• Joint 3 moves from 60 degrees to 120 degrees.
During joint interpolation, the movement of each joint happens simultaneously but
independently, aiming to reach the target positions at the same time:
Straight line interpolation:
Straight-line interpolation, also known as Cartesian or linear interpolation, is a method in
robotics where the end effector of a robot moves along a straight line from a starting point to
a target point in Cartesian space. This technique ensures that the movement follows the shortest
path between two points, which is particularly important for tasks requiring precision, such as
assembly or welding.
Illustration:
Imagine a robot arm with an end effector that needs to move from Point A (starting position)
to Point B (target position) in a straight line.
1. Initial Position (Point A):
o Coordinates: (X1, Y1, Z1)
2. Target Position (Point B):
9
o Coordinates: (X2, Y2, Z2)
With straight-line interpolation, the movement of the end effector will follow a direct path
from Point A to Point B.
Circular interpolation:
In circular interpolation, the programmer defines a circle in the robot's workspace by
specifying three points on the circle. The controller then approximates the circle by selecting
a series of points that are closest to the defined circle. The robot moves in short straight-line
segments to create this approximation. If the points are close enough together, the result looks
like a real circle. Circular interpolation is usually programmed using a textual programming
language rather than leadthrough techniques.
Irregular smooth motions (manual leadthrough programming):
Irregular smooth motions refer to movements that are not in a straight line or regular path but
are still smooth and continuous. These motions are often necessary in applications where the
robot needs to navigate around obstacles, follow a non-linear path, or perform complex tasks
requiring fluid movements.
Key Points:
• Non-linear Path: The path is not a straight line or regular curve but may include various
bends, turns, and changes in direction.
10
• Smooth and Continuous: Despite the irregularity, the motion remains smooth,
avoiding abrupt stops or changes in speed and direction.
• Precision: Irregular smooth motions require precise control to ensure the robot follows
the intended path accurately.
• Complex Tasks: Such motions are essential for tasks like painting intricate patterns,
welding along complex contours, or navigating through cluttered environments.
Example:
Imagine a robotic arm tasked with painting a complex, wavy pattern on a surface. The arm
needs to follow an irregular path that includes multiple curves and changes in direction. Using
irregular smooth motions, the arm can move fluidly along the path, ensuring a consistent and
high-quality paint job without any jerky or abrupt movements.
Wait, Signal and Delay commands:
In robotics, wait, signal, and delay commands are essential for controlling the timing and
synchronization of robot actions. These commands ensure that the robot performs tasks in the
correct sequence and at the appropriate times, which is crucial for complex operations
involving multiple steps or coordination with other equipment.
1. Wait Command:
Purpose: The wait command pauses the execution of the robot program until a specified
condition is met. This condition can be an external signal, a specific event, or a time delay.
Example Use Cases:
• Waiting for a part to arrive at a specific position before starting an operation.
• Waiting for an external signal indicating that a machine in the workcell has completed
its task.
2. Signal Command:
Purpose: The signal command is used to send a signal to other devices or parts of the system,
indicating that a specific action has been completed or that a particular condition has been met.
11
Example Use Cases:
• Sending a signal to another robot or machine to start its task after the current robot has
finished its operation.
• Indicating that a safety condition has been satisfied, allowing the next step to proceed.
3. Delay Command:
Purpose: The delay command pauses the execution of the robot program for a specified
amount of time. This is useful for creating precise timing in operations and ensuring that tasks
are performed at the right intervals.
Example Use Cases:
• Pausing for a set amount of time to allow paint or glue to dry before proceeding to the
next step.
• Introducing a delay to synchronize actions with other equipment or processes.
Branching:
Most industrial robot controllers allow programs to be divided into branches, enabling
the program to be split into segments that can be executed at different times. A branch functions
like a subroutine, which can be called multiple times during the program. This subroutine can
be executed either by branching to it at a specific point in the program or by testing an input
signal. The amount of decision logic a program can incorporate depends on the controller.
Most controllers allow branches to be identified by pre-established names and use incoming
signals to trigger a branch. Users can specify whether the signal should interrupt the current
branch or wait until it finishes. The interrupt feature is often used for error branches, triggered
by an incoming signal indicating an abnormal event. In such cases, the robot will either take
corrective action or stop and signal for human assistance, depending on the design of the error
branch.
Let us illustrate these branching concepts by developing two versions of a robot program
to perform a palletizing operation. A pallet is a common type of container used in a factory to
hold and move parts. Suppose that the operation required the robot to pick up parts from an
12
input chute, and place them on a pallet with 24 positions as depicted in Fig. 8.10. When a start
signal is given, the robot must begin picking up parts and loading them into the pallet,
continuing until all 24 positions on the pallet are filled. The robot must then generate a signal
to indicate that the pallet is full, and wait for the start signal to begin the next cycle.
For the purpose of discussion, several points will be defined that the robot must go to
during the execution of the palletizing program. We will use names for convenience to identify
these points, with the understanding that the names must be defined in terms of robot joint
coordinates. When the robot is directed to go to the point name in the program, it goes to the
associated joint coordinates.
In creating robot programs for pelletizing operations of this type, the robot is
programmed to approach a given part from a direction chosen to avoid interference with other
parts. Accordingly, the various pallet locations would be approached from points at some
distance directly above each location. The 24 points named ABOVE 1 through ABOVE 24
have been designated for this purpose. Similarly, the point named INTER has been defined
above the chute for the same reason. The speed at which the program is executed should be
varied during the program. When the gripper is approaching a pick up or drop off point, the
speed setting should be at a relatively slow value. When the robot moves larger distances
between the chute and the pallet, higher speeds would be programmed.
13
Capabilities and limitations of lead-through methods:
Capabilities:
1. Teach Pendants:
o Teach pendants can easily define points in space and set speeds using toggle
switches and dials.
o Special buttons or console commands are used for WAIT, SIGNAL, and DELAY
functions.
o Branching can be programmed with toggle switches on the pendant or controller,
allowing the execution of different paths based on predefined conditions.
o Some teach pendants, like the one for the MAKER 110 model, are advanced and
offer features similar to textual programming languages.
Limitations:
1. Production Downtime:
o Robots cannot be used for production while being programmed, leading to
economic inefficiencies.
o Large batch sizes are required to justify the programming time.
2. Complexity:
o As programs become more complex, lead-through programming becomes more
challenging and time-consuming.
o Defining non-motion activities is harder with a teach pendant compared to using
textual languages.
3. Integration with Modern Technologies:
o Lead-through programming is not compatible with modern computer-based
systems like CAD/CAM, data communications, and integrated manufacturing
systems.
14
o It does not support the communication and database requirements of computer-
integrated manufacturing (CIM) systems.
o Textual robot languages are better suited for integration with these systems.
15