Untitled
Transcrição
Untitled
Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Visit us on the World Wide Web at: www.pearsoned.co.uk © Pearson Education Limited 2014 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without either the prior written permission of the publisher or a licence permitting restricted copying in the United Kingdom issued by the Copyright Licensing Agency Ltd, Saffron House, 6–10 Kirby Street, London EC1N 8TS. All trademarks used herein are the property of their respective owners. The use of any trademark in this text does not vest in the author or publisher any trademark ownership rights in such trademarks, nor does the use of such trademarks imply any affiliation with or endorsement of this book by such owners. ISBN 10: 1-292-02592-1 ISBN 13: 978-1-292-02592-6 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library Printed in the United States of America Sec. 8.6 / Robot Programming 8.6 ROBOT PROGRAMMING To do useful work, a robot must be programmed to perform its motion cycle. A robot program can be defined as a path in space to be followed by the manipulator, combined with peripheral actions that support the work cycle. Examples of the peripheral actions include opening and closing the gripper, performing logical decision making, and communicating with other pieces of equipment in the robot cell. A robot is programmed by entering the programming commands into its controller memory. Different robots use different methods of entering the commands. In the case of limited sequence robots, programming is accomplished by setting limit switches and mechanical stops to control the endpoints of its motions. The sequence in which the motions occur is regulated by a sequencing device. This device determines the order in which each joint is actuated to form the complete motion cycle. Setting the stops and switches and wiring the sequencer is more akin to a manual setup than programming. Today, nearly all industrial robots have digital computers as their controllers, and compatible storage devices as their memory units. For these robots, three programming methods can be distinguished: (1) leadthrough programming, (2) computer-like robot programming languages, and (3) off-line programming. 8.6.1 Leadthrough Programming Leadthrough programming dates from the early 1960s before computer control was prevalent. The same basic methods are used today for many computer controlled robots. In leadthrough programming, the task is taught to the robot by moving the manipulator through the required motion cycle, simultaneously entering the program into the controller memory for subsequent playback. Powered Leadthrough Versus Manual Leadthrough. There are two methods of performing the leadthrough teach procedure: (1) powered leadthrough and (2) manual leadthrough. The difference between the two is in the manner in which the manipulator is moved through the motion cycle during programming. Powered leadthrough is commonly used as the programming method for playback robots with point-to-point control. It involves the use of a teach pendant (hand-held control box) that has toggle switches and/or contact buttons for controlling the movement of the manipulator joints. Figure 8.13 illustrates the important components of a teach pendant. Using the toggle switches or buttons, the programmer power drives the robot arm to the desired positions, in sequence, and records the positions into memory. During subsequent playback, the robot moves through the sequence of positions under its own power. Manual leadthrough is convenient for programming playback robots with continuous path control where the continuous path is an irregular motion pattern such as in spray painting. This programming method requires the operator to physically grasp the end-ofarm or the tool that is attached to the arm and move it through the motion sequence, recording the path into memory. Because the robot arm itself may have significant mass and would therefore be difficult to move, a special programming device often replaces the actual robot for the teach procedure. The programming device has the same joint configuration as the robot and is equipped with a trigger handle (or other control switch), which the operator activates when recording motions into memory. The motions are recorded as 237 Chap. 8 / Industrial Robotics ON OFF LED display 50 25 Speed control 1 X 2 Y RECORD 3 Z JOINT 4 RX WORLD 5 RY TOOL 6 RZ 75 0 100 Record locations Motion control Computer or teach pendant mode TOOL MODE O C Toggle switches for joint control Gripper open/close Figure 8.13 A typical robot teach pendant. a series of closely spaced points. During playback, the path is recreated by controlling the actual robot arm through the same sequence of points. Motion Programming. The leadthrough methods provide a very natural way to program motion commands into the robot controller. In manual leadthrough, the operator simply moves the arm through the required path to create the program. In powered leadthrough, the operator uses a teach pendant to drive the manipulator. The teach pendant is equipped with a toggle switch or contact buttons for each joint. By activating these switches or buttons in a coordinated fashion for the various joints, the programmer moves the manipulator to the required positions in the work space. Coordinating the individual joints with the teach pendant is an awkward and tedious way to enter motion commands to the robot. For example, it is difficult to coordinate the individual joints of a jointed-arm robot (TRR configuration) to drive the end-of-arm in a straight-line motion. Therefore, many of the robots using powered leadthrough provide two alternative methods for controlling movement of the entire manipulator during programming, in addition to controls for individual joints. With these methods, the programmer can move the robot’s wrist end in straight line paths. The names given to these alternatives are (1) world-coordinate system and (2) tool-coordinate system. Both systems make use of a Cartesian coordinate system. In a world-coordinate system, the origin and axes are defined relative to the robot base, as illustrated in Figure 8.14(a). In a tool-coordinate system, shown in Figure 8.14(b), the alignment of the axis system is defined relative to the orientation of the wrist faceplate (to which the end effector is 238 Sec. 8.6 / Robot Programming z z y Tool End-of-arm moves are parallel to world axes x y World coordinate system x (a) Moves are relative to axis system defined by tool orientation x y z (b) Figure 8.14 system. (a) World coordinate system. (b) Tool coordinate attached). In this way, the programmer can orient the tool in a desired way and then control the robot to make linear moves in directions parallel or perpendicular to the tool. The world- and tool-coordinate systems are useful only if the robot has the capacity to move its wrist end in a straight line motion, parallel to one of the axes of the coordinate system. Straight line motion is quite natural for a Cartesian coordinate robot (LOO configuration) but unnatural for robots with any combination of rotational joints (types R, T, and V). Accomplishing straight line motion requires manipulators with these types of joints to carry out a linear interpolation process. In straight line interpolation, the control computer calculates the sequence of addressable points in space through which the wrist end must move to achieve a straight line path between two points. Other types of interpolation are available. More common than straight line interpolation is joint interpolation. When a robot is commanded to move its wrist end between two points using joint interpolation, it actuates each of the joints simultaneously at its own constant speed such that all of the joints start and stop at the same time. The advantage of joint interpolation over straight line interpolation is that usually less total motion energy is required to make the move. This may mean that the move could be made in slightly less time. It should be noted that in the case of a Cartesian coordinate robot, joint interpolation and straight line interpolation result in the same motion path. 239 Chap. 8 / Industrial Robotics Still another form of interpolation is used in manual leadthrough programming. In this case, the robot must follow the sequence of closely spaced points that are defined during the programming procedure. In effect, this is an interpolation process for a path that usually consists of irregular smooth motions, such as in spray painting. The speed of the robot is controlled by means of a dial or other input device, located on the teach pendant and/or the main control panel. Certain motions in the work cycle should be performed at high speeds (e.g., moving parts over substantial distances in the work cell), while other motions require low speed operation (e.g., motions that require high precision in placing the workpart). Speed control also permits a given program to be tried out at a safe slow speed and then used at a higher speed during production. Advantages and Disadvantages. The advantage offered by the leadthrough methods is that they can be readily learned by shop personnel. Programming the robot by moving its arm through the required motion path is a logical way for someone to teach the work cycle. It is not necessary for the robot programmer to possess knowledge of computer programming. The robot languages described in the next section, especially the more advanced languages, are more easily learned by someone whose background includes computer programming. There are several inherent disadvantages of the leadthrough programming methods. First, regular production must be interrupted during the leadthrough programming procedures. In other words, leadthrough programming results in downtime of the robot cell or production line. The economic consequence of this is that the leadthrough methods must be used for relatively long production runs and are inappropriate for small batch sizes. Second, the teach pendant used with powered leadthrough and the programming devices used with manual leadthrough are limited in terms of the decision-making logic that can be incorporated into the program. It is much easier to write logical instructions using the computer-like robot languages than the leadthrough methods. Third, since the leadthrough methods were developed before computer control became common for robots, these methods are not readily compatible with modern computer-based technologies such as CAD/CAM, manufacturing data bases, and local communications networks. The capability to readily interface the various computer-automated subsystems in the factory for transfer of data is considered a requirement for achieving computer integrated manufacturing. 8.6.2 Robot Programming Languages The use of textual programming languages became an appropriate programming method as digital computers took over the control function in robotics. Their use has been stimulated by the increasing complexity of the tasks that robots are called on to perform, with the concomitant need to imbed logical decisions into the robot work cycle.These computer-like programming languages are really on-line/off-line methods of programming, because the robot must still be taught its locations using the leadthrough method. Textual programming languages for robots provide the opportunity to perform the following functions that leadthrough programming cannot readily accomplish: • enhanced sensor capabilities, including the use of analog as well as digital inputs and outputs, • improved output capabilities for controlling external equipment, 240 Sec. 8.6 / Robot Programming • program logic that is beyond the capabilities of leadthrough methods, • computations and data processing similar to computer programming languages, • communications with other computer systems. This section reviews some of the capabilities of the robot programming languages. Many of the language statements are taken from commercially available robot languages. Motion Programming. Motion programming with robot languages usually requires a combination of textual statements and leadthrough techniques. Accordingly, this method of programming is sometimes referred to as on-line/off-line programming. The textual statements are used to describe the motion, and the leadthrough methods are used to define the position and orientation of the robot during and/or at the end of the motion. To illustrate, the basic motion statement is MOVE P1 which commands the robot to move from its current position to a position and orientation defined by the variable name P1. The point P1 must be defined, and the most convenient way to define P1 is to use either powered leadthrough or manual leadthrough to place the robot at the desired point and record that point into memory. Statements such as HERE P1 or LEARN P1 are used in the leadthrough procedure to indicate the variable name for the point. What is recorded into the robot’s control memory is the set of joint positions or coordinates used by the controller to define the point. For example, the aggregate (236, 158, 65, 0, 0, 0) could be utilized to represent the joint positions for a six-jointed manipulator. The first three values (236, 158, 65) give the joint positions of the body-and-arm, and the last three values (0, 0, 0) define the wrist joint positions. The values are specified in millimeters or degrees, depending on the joint types. There are variants of the MOVE statement. These include the definition of straight line interpolation motions, incremental moves, approach and depart moves, and paths. For example, the statement MOVES P1 denotes a move that is to be made using straight line interpolation. The suffix S on MOVE designates straight-line motion. An incremental move is one whose endpoint is defined relative to the current position of the manipulator rather than to the absolute coordinate system of the robot. For example, suppose the robot is presently at a point defined by the joint coordinates (236, 158, 65, 0, 0, 0), and it is desired to move joint 4 (corresponding to a twisting motion of 241