Docsity

RAPID Programming for Industrial Robots, Cheat Sheet of Law

Partial preview of the text

Download RAPID Programming for Industrial Robots and more Cheat Sheet Law in PDF only on Docsity!

ABB Robotics

Application manual

Motion functions and events

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

The information in this manual is subject to change without notice and should not be construed as a commitment by ABB. ABB assumes no responsibility for any errors that may appear in this manual.

Except as may be expressly stated anywhere in this manual, nothing herein shall be construed as any kind of guarantee or warranty by ABB for losses, damages to persons or property, fitness for a specific purpose or the like.

In no event shall ABB be liable for incidental or consequential damages arising from use of this manual and products described herein.

This manual and parts thereof must not be reproduced or copied without ABB's written permission, and contents thereof must not be imparted to a third party nor be used for any unauthorized purpose. Contravention will be prosecuted.

Additional copies of this manual may be obtained from ABB at its then current charge.

© Copyright 2004, 2006, 2009-2011 ABB All rights reserved. ABB AB Robotics Products SE-721 68 Västerås Sweden

Table of Contents

  • Overview of this manual. © Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.
  • Product documentation, M2004
  • Safety
  • 1 World Zones (608-1)
    • 1.1 Overview
    • 1.2 RAPID components
    • 1.3 Code examples
  • 2 Fixed Position Events
    • 2.1 Overview
    • 2.2 RAPID components and system parameters
    • 2.3 Code examples
  • 3 Independent Axes (610-1)
    • 3.1 Overview
    • 3.2 System parameters
    • 3.3 RAPID components
    • 3.4 Code examples
  • 4 Path Recovery (611-1)
    • 4.1 Overview
    • 4.2 RAPID components
    • 4.3 Store current path
    • 4.4 Path recorder.
  • 5 Path Offset (612-1)
    • 5.1 Overview
    • 5.2 RAPID components
    • 5.3 Related RAPID functionality
    • 5.4 Code example
  • Index

Overview of this manual

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

Overview of this manual

About this manual

This manual explains the basics of when and how to use the following RobotWare base

functionality and options:

  • World Zones (608-1)
  • Fixed Position Events
  • Independent Axes (610-1)
  • Path Recovery (611-1)
  • Path Offset (612-1)

Usage

This manual can be used either as a reference to find out if a base functionality or option is

the right choice for solving a problem, or as a description of how to use a base functionality

or option. Detailed information regarding syntax for RAPID routines, and similar, is not

described here, but can be found in the respective reference manual.

Who should read this manual?

This manual is mainly intended for robot programmers.

Prerequisites

The reader should...

  • be familiar with industrial robots and their terminology
  • be familiar with the RAPID programming language
  • be familiar with system parameters and how to configure them.

Organization of chapters

The manual is organized in the following chapters:

References

Chapter Contents

  1. Describes the option World Zones.
  2. Describes the base functionality Fixed Position Events.
  3. Describes the option Independent Axes.
  4. Describes the option Path Recovery.
  5. Describes the option Path Offset.

Reference Document Id

Technical reference manual - RAPID overview 3HAC16580- Technical reference manual - RAPID Instructions, Functions and Data types

3HAC16581-

Operating manual - IRC5 with FlexPendant 3HAC16590- Technical reference manual - System parameters 3HAC17076- Application manual - MultiMove 3HAC021272-

Continues on next page

Overview of this manual. © Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

Revisions

Revision Description

  • First edition A Minor corrections. Option changed name from Independent Movements to Independent Axes. Path recorder added to Path Recovery. B New instructions used for MultiMove systems. C Path Recovery: Corrected errors in code examples. D Fixed Position Events is now part of the RobotWare base functionality. E Path Recovery: StorePath and RestoPath is now included in RobotWare base. F Added instructions TriggRampAO and TriggLIOs and datatypes triggios, triggiosdnum, and triggstrgo to Fixed Position Events.

Continued

Product documentation, M

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

Application manuals

Specific applications (for example software or hardware options) are described in

Application manuals. An application manual can describe one or several applications.

An application manual generally contains information about:

  • The purpose of the application (what it does and when it is useful).
  • What is included (for example cables, I/O boards, RAPID instructions, system

parameters, DVD with PC software).

  • How to install included or required hardware.
  • How to use the application.
  • Examples of how to use the application.

Operating manuals

The operating manuals describe hands-on handling of the products. The manuals are aimed

at those having first-hand operational contact with the product, that is production cell

operators, programmers, and trouble shooters.

The group of manuals includes (among others):

  • Emergency safety information
  • General safety information
  • Getting started, IRC5 and RobotStudio
  • Introduction to RAPID
  • IRC5 with FlexPendant
  • RobotStudio
  • Trouble shooting , for the controller and manipulator.

Continued

Safety

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

Safety

Safety of personnel

A robot is heavy and extremely powerful regardless of its speed. A pause or long stop in

movement can be followed by a fast hazardous movement. Even if a pattern of movement is

predicted, a change in operation can be triggered by an external signal resulting in an

unexpected movement.

Therefore, it is important that all safety regulations are followed when entering safeguarded

space.

Safety regulations

Before beginning work with the robot, make sure you are familiar with the safety regulations

described in the manual Operating manual - General safety information.

1 World Zones (608-1)

1.1. Overview

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

1 World Zones (608-1)

1.1. Overview

Purpose

The purpose of World Zones is to stop the robot or set an output signal if the robot is inside a

special user-defined zone. Here are some examples of applications:

  • When two robots share a part of their respective work areas. The possibility of the two

robots colliding can be safely eliminated by World Zones supervision.

  • When a permanent obstacle or some temporary external equipment is located inside

the robot’s work area. A forbidden zone can be created to prevent the robot from

colliding with this equipment.

  • Indication that the robot is at a position where it is permissible to start program

execution from a Programmable Logic Controller (PLC).

A world zone is supervised during robot movements both during program execution and

jogging. If the robot’s TCP reaches the world zone or if the axes reaches the world zone in

joints, the movement is stopped or a digital output signal is set.

WARNING!

For safety reasons, this software shall not be used for protection of personnel. Use hardware

protection equipment for that.

What is included

The RobotWare option World Zones gives you access to:

  • instructions used to define volumes of various shapes
  • instructions used to define joint zones in coordinates for axes
  • instructions used to define and enable world zones

Basic approach

This is the general approach for setting up World Zones. For a more detailed example of how

this is done, see Code examples on page 14.

1. Declare the world zone as stationary or temporary.

2. Declare the shape variable.

3. Define the shape that the world zone shall have.

4. Define the world zone (that the robot shall stop or that an output signal shall be set when

reaching the volume).

Limitations

Supervision of a volume only works for the TCP. Any other part of the robot may pass

through the volume undetected. To be certain to prevent this, you can supervise a joint world

zone (defined byWZLimJointDef or WZHomeJointDef).

A variable of type wzstationary or wztemporary can not be redefined. They can only be

defined once (with WZLimSup or WZDOSet).

1 World Zones (608-1)

1.2. RAPID components

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

1.2. RAPID components

Data types

This is a brief description of each data type in World Zones. For more information, see

respective data type in Technical reference manual - RAPID Instructions, Functions and Data

types.

Instructions

This is a brief description of each instruction in World Zones. For more information, see

respective instruction in Technical reference manual - RAPID Instructions, Functions and

Data types.

Data type Description

wztemporary wztemporary is used to identify a temporary world zone and can be used anywhere in the RAPID program. Temporary world zones can be disabled, enabled again, or erased via RAPID instructions. Temporary world zones are automatically erased when a new program is loaded or when program execution start from the beginning in the MAIN routine. wzstationary wzstationary is used to identify a stationary world zone and can only be used in an event routine connected to the event POWER ON. For information on defining event routines, see Operating manual - IRC5 with FlexPendant. A stationary world zone is always active and is reactivated by a warm start (switch power off then on, or change system parameters). It is not possible to disable, enable or erase a stationary world zone via RAPID instructions. Stationary world zones shall be used if security is involved. shapedata shapedata is used to describe the geometry of a world zone. World zones can be defined in 4 different geometrical shapes:

  • a straight box, with all sides parallel to the world coordinate system
  • a cylinder, parallel to the z axis of the world coordinate system
  • a sphere
  • a joint angle area for the robot axes and/or external axes

Instruction Description

WZBoxDef WZBoxDef is used to define a volume that has the shape of a straight box with all its sides parallel to the axes of the world coordinate system. The definition is stored in a variable of type shapedata. The volume can also be defined as the inverse of the box (all volume outside the box). WZCylDef WZCylDef is used to define a volume that has the shape of a cylinder with the cylinder axis parallel to the z-axis of the world coordinate system. The definition is stored in a variable of type shapedata. The volume can also be defined as the inverse of the cylinder (all volume outside the cylinder). WZSphDef WZSphDef is used to define a volume that has the shape of a sphere. The definition is stored in a variable of type shapedata. The volume can also be defined as the inverse of the sphere (all volume outside the sphere).

Continues on next page

1 World Zones (608-1)

1.3. Code examples

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

1.3. Code examples

Create protected box

To prevent the robot TCP from moving into stationary equipment, set up a stationary world

zone around the equipment.

The routine my_power_on should then be connected to the event POWER ON. For

information on how to do this, read about defining event routines in Operating manual - IRC

with FlexPendant.

xx VAR wzstationary obstacle; PROC my_power_on() VAR shapedata volume; CONST pos p1 := [200, 100, 100]; CONST pos p2 := [600, 400, 400];

!Define a box between the corners p1 and p WZBoxDef \Inside, volume, p1, p2;

!Define and enable supervision of the box WZLimSup \Stat, obstacle, volume; ENDPROC

Continues on next page

1 World Zones (608-1)

1.3 Code examples

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

Signal when robot is in position

When two robots share a work area it is important to know when a robot is out of the way,

letting the other robot move freely.

This example defines a home position where the robot is in a safe position and sets an output

signal when the robot is in its home position. The robot is standing on a travel track, handled

as external axis 1. No other external axes are active.

The shadowed area in the illustration shows the world zone.

xx VAR wztemporary home; PROC zone_output() VAR shapedata joint_space;

!Define the home position CONST jointtarget home_pos := [[0, -20, 0, 0, 0, 0], [0, 9E9, 9E9, 9E9, 9E9, 9E9]];

!Define accepted deviation from the home position CONST jointtarget delta_pos := [[2, 2, 2, 2, 2, 2], [10, 9E9, 9E9, 9E9, 9E9, 9E9]];

!Define the shape of the world zone WZHomeJointDef \Inside, joint_space, home_pos, delta_pos;

!Define the world zone, setting the !signal do_home to 1 when in zone WZDOSet \Temp, home \Inside, joint_space, do_home, 1; ENDPROC

Continued

2 Fixed Position Events

2.1 Overview

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

2 Fixed Position Events

2.1. Overview

Purpose

The purpose of Fixed Position Events is to make sure a program routine is executed when the

position of the TCP is well defined.

If a move instruction is called with the zone argument set to fine, the next routine is always

executed once the TCP has reached its target. If a move instruction is called with the zone

argument set to a distance (for example z20), the next routine may be executed before the

TCP is even close to the target. This is because there is always a delay between the execution

of RAPID instructions and the robot movements.

Calling the move instruction with zone set to fine will slow down the movements. With

Fixed Position Events, a routine can be executed when the TCP is at a specified position

anywhere on the TCP path without slowing down the movement.

What is included

The RobotWare base functionality Fixed Position Events gives you access to:

  • instructions used to define a position event
  • instructions for moving the robot and executing the position event at the same time
  • instructions for moving the robot and calling a procedure while passing the target,

without first defining a position event

Basic approach

Fixed Position Events can either be used with one simplified instruction calling a procedure

or it can be set up following these general steps. For more detailed examples of how this is

done, see Code examples on page 21.

1. Declare the position event.

2. Define the position event:

  • when it shall occur, compared to the target position
  • what it shall do

3. Call a move instruction that uses the position event. When the TCP is as close to the target

as defined, the event will occur.

2 Fixed Position Events

2.2 RAPID components and system parameters

© Copyright 2004, 2006, 2009-2011 ABB. All rights reserved.

2.2. RAPID components and system parameters

Data types

This is a brief description of each data type in Fixed Position Events. For more information,

see the respective data type in Technical reference manual - RAPID Instructions, Functions

and Data types.

Instructions

This is a brief description of each instruction in Fixed Position Events. For more information,

see the respective instruction in Technical reference manual - RAPID Instructions, Functions

and Data types.

Data type Description

triggdata triggdata is used to store data about a position event. A position event can take the form of setting an output signal or running an interrupt routine at a specific position along the movement path of the robot. triggdata also contains information on when the action shall occur, for example when the TCP is at a defined distance from the target. triggdata is a non-value data type. triggios triggios is used to store data about a position event used by the instruction TriggLIOs. triggios sets the value of an output signal using a num value. triggiosdnum triggiosdnum is used to store data about a position event used by the instruction TriggLIOs. triggiosdnum sets the value of an output signal using a dnum value. triggstrgo triggstrgo is used to store data about a position event used by the instruction TriggLIOs. triggstrgo sets the value of an output signal using a stringdig value (string containing a number).

Instruction Description

TriggIO TriggIO defines the setting of an output signal and when to set that signal. The definition is stored in a variable of type triggdata. TriggIO can define the setting of the signal to occur at a certain distance (in mm) from the target, or a certain time from the target. It is also possible to set the signal at a defined distance or time from the starting position. By setting the distance to 0 (zero), the signal will be set when the TCP is as close to the target as it gets (the middle of the corner path). TriggEquip TriggEquip works like TriggIO, with the difference that TriggEquip can compensate for the internal delay of the external equipment. For example, the signal to a glue gun must be set a short time before the glue is pressed out and the gluing begins. TriggInt TriggInt defines when to run an interrupt routine. The definition is stored in a variable of type triggdata. TriggInt defines at what distance (in mm) from the target (or from the starting position) the interrupt routine shall be called. By setting the distance to 0 (zero), the interrupt will occur when the TCP is as close to the target as it gets (the middle of the corner path).

Continues on next page