Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


Introdução à Programação RAPID para Robôs KUKA: Estrutura do Linguagem e Movimentos, Notas de estudo de Engenharia Elétrica

Este documento fornece uma visão geral da estrutura da linguagem rapid utilizada na programação de robôs kuka. Aborda conceitos básicos, como chamar rotinas, repetir seções do programa, deslocamentos de programa e parâmetros de movimento. Além disso, trata-se de erros e interrupções, interpolação de posição e orientação da ferramenta, e configuração de sinais.

Tipologia: Notas de estudo

2014

Compartilhado em 03/03/2014

marcio-flavio-vidal-1
marcio-flavio-vidal-1 🇧🇷

5

(5)

31 documentos

1 / 184

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
ABB Flexible Automation
RAPID Reference Manual
RAPID Overview On-line
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe Introdução à Programação RAPID para Robôs KUKA: Estrutura do Linguagem e Movimentos e outras Notas de estudo em PDF para Engenharia Elétrica, somente na Docsity!

ABB Flexible Automation

RAPID Reference Manual

RAPID Overview On-line

ABB Robotics Products AB DPT / MT S-72168 VÄSTERÅS SWEDEN Telephone: (0) 21 344000 Telefax: (0) 21 132592

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

In no event shall ABB Robotics Products AB be liable for incidental or consequential damages arising from use of this document or of the software and hardware described in this document.

This document and parts thereof must not be reproduced or copied without ABB Robotics Products AB´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 document may be obtained from ABB Robotics Products AB at its then current charge.

© ABB Robotics Products AB Article number: 3HAC 0966- Issue: For BaseWare OS 3. ABB Robotics Products AB S-721 68 Västerås Sweden

CONTENTS

Page

Page

  • Overview 1- Page
  • 1 Table of Contents 1-
  • 2 Introduction 2- - 1 Other Manuals 2- - 2 How to Read this Manual.................................................................................... 2- - 2.1 Typographic conventions 2- - 2.2 Syntax rules................................................................................................... 2- - 2.3 Formal syntax................................................................................................ 2-
  • 3 RAPID Summary...................................................................................... 3- - 1 The Structure of the Language........................................................................... 3- - 2 Controlling the Program Flow............................................................................ 3- - 2.1 Programming principles................................................................................ 3- - 2.2 Calling another routine.................................................................................. 3- - 2.3 Program control within the routine 3- - 2.4 Stopping program execution 3- - 2.5 Stop current cycle.......................................................................................... 3- - 3 Various Instructions............................................................................................. 3- - 3.1 Assigning a value to data 3- - 3.2 Wait 3- - 3.3 Comments 3- - 3.4 Loading program modules 3- - 3.5 Various functions........................................................................................... 3- - 3.6 Basic data 3- - 3.7 Conversion function...................................................................................... 3- - 4 Motion Settings 3- - 4.1 Programming principles................................................................................ 3- - 4.2 Defining velocity........................................................................................... 3- - 4.3 Defining acceleration 3- - 4.4 Defining configuration management 3- - 4.5 Defining the payload..................................................................................... 3- - 4.6 Defining the behaviour near singular points 3- - 4.7 Displacing a program 3- - 4.8 Soft servo 3- - 4.9 Adjust the robot tuning values 3- - 4.10 World Zones 3- - 4.11 Data for motion settings 3- - 5 Motion 3- - 5.1 Programming principles................................................................................ 3-
    • 5.2 Positioning instructions................................................................................. 3- 1-2 Overview
    • 5.3 Searching....................................................................................................... 3-
    • 5.4 Activating outputs or interrupts at specific positions 3-
    • 5.5 Motion control if an error/interrupt takes place............................................ 3-
    • 5.6 Controlling external axes 3-
    • 5.7 Independent axes........................................................................................... 3-
    • 5.8 Position functions.......................................................................................... 3-
    • 5.9 Motion data 3-
    • 5.10 Basic data for movements........................................................................... 3-
  • 6 Input and Output Signals.................................................................................... 3-
    • 6.1 Programming principles................................................................................ 3-
    • 6.2 Changing the value of a signal...................................................................... 3-
    • 6.3 Reading the value of an input signal............................................................. 3-
    • 6.4 Reading the value of an output signal........................................................... 3-
    • 6.5 Testing input on output signals 3-
    • 6.6 Disabling and enabling I/O modules............................................................. 3-
    • 6.7 Defining input and output signals 3-
  • 7 Communication.................................................................................................... 3-
    • 7.1 Programming principles................................................................................ 3-
    • 7.2 Communicating using the teach pendant 3-
    • 7.3 Reading from or writing to a character-based serial channel/file 3-
    • 7.4 Communicating using binary serial channels/files 3-
    • 7.5 Data for serial channels................................................................................. 3-
  • 8 Interrupts 3-
    • 8.1 Programming principles................................................................................ 3-
    • 8.2 Connecting interrupts to trap routines........................................................... 3-
    • 8.3 Ordering interrupts........................................................................................ 3-
    • 8.4 Cancelling interrupts..................................................................................... 3-
    • 8.5 Enabling/disabling interrupts 3-
    • 8.6 Data type of interrupts 3-
  • 9 Error Recovery 3-
    • 9.1 Programming principles................................................................................ 3-
    • 9.2 Creating an error situation from within the program 3-
    • 9.3 Restarting/returning from the error handler.................................................. 3-
    • 9.4 Data for error handling.................................................................................. 3-
  • 10 System & Time 3-
    • 10.1 Programming principles.............................................................................. 3-
    • 10.2 Using a clock to time an event.................................................................... 3-
  • Overview 1- - 10.3 Reading current time and date 3- - 10.4 Retrieve time information from file 3-
    • 11 Mathematics 3-
      • 11.1 Programming principles 3-
      • 11.2 Simple calculations on numeric data........................................................... 3-
      • 11.3 More advanced calculations 3-
      • 11.4 Arithmetic functions.................................................................................... 3-
    • 12 Spot Welding 3-
      • 12.1 Spot welding features.................................................................................. 3-
      • 12.2 Principles of SpotWare................................................................................ 3-
      • 12.3 Programming principles.............................................................................. 3-
      • 12.4 Spot welding instructions............................................................................ 3-
      • 12.5 Spot welding data........................................................................................ 3-
    • 13 Arc Welding........................................................................................................ 3-
      • 13.1 Programming principles.............................................................................. 3-
      • 13.2 Arc welding instructions 3-
      • 13.3 Arc welding data 3-
    • 14 GlueWare 3-
      • 14.1 Glueing features 3-
      • 14.2 Programming principles.............................................................................. 3-
      • 14.3 Glue instructions 3-
      • 14.4 Glue data 3-
    • 15 External Computer Communication 3-
      • 15.1 Programming principles.............................................................................. 3-
      • 15.2 Sending a program-controlled message from the robot to a computer 3-
    • 16 Service Instructions 3-
      • 16.1 Directing a value to the robot’s test signal.................................................. 3-
    • 17 String Functions................................................................................................. 3-
      • 17.1 Basic Operations 3-
      • 17.2 Comparison and Searching 3-
      • 17.3 Conversion 3-
    • 18 Multitasking 3-
      • 18.1 Basics 3-
      • 18.2 Resource access Protection 3-
    • 19 Syntax Summary................................................................................................ 3-
      • 19.1 Instructions.................................................................................................. 3-
      • 19.2 Functions..................................................................................................... 3-
  • 4 Basic Characteristics 4- 1-4 Overview
    • 1 Basic Elements 4-
      • 1.1 Identifiers 4-
      • 1.2 Spaces and new-line characters 4-
      • 1.3 Numeric values 4-
      • 1.4 Logical values 4-
      • 1.5 String values.................................................................................................. 4-
      • 1.6 Comments 4-
      • 1.7 Placeholders 4-
      • 1.8 File header..................................................................................................... 4-
      • 1.9 Syntax 4-
    • 2 Modules................................................................................................................. 4-
      • 2.1 Program modules 4-
      • 2.2 System modules 4-
      • 2.3 Module declarations...................................................................................... 4-
      • 2.4 Syntax 4-
    • 3 Routines 4-
      • 3.1 Routine scope................................................................................................ 4-
      • 3.2 Parameters..................................................................................................... 4-
      • 3.3 Routine termination 4-
      • 3.4 Routine declarations...................................................................................... 4-
      • 3.5 Procedure call................................................................................................ 4-
      • 3.6 Syntax 4-
    • 4 Data Types 4-
      • 4.1 Non-value data types..................................................................................... 4-
      • 4.2 Equal (alias) data types 4-
      • 4.3 Syntax 4-
    • 5 Data 4-
      • 5.1 Data scope..................................................................................................... 4-
      • 5.2 Variable declaration 4-
      • 5.3 Persistent declaration 4-
      • 5.4 Constant declaration...................................................................................... 4-
      • 5.5 Initiating data 4-
      • 5.6 Syntax 4-
    • 6 Instructions........................................................................................................... 4-
      • 6.1 Syntax 4-
    • 7 Expressions........................................................................................................... 4-
      • 7.1 Arithmetic expressions.................................................................................. 4-
  • Overview 1- - 7.2 Logical expressions....................................................................................... 4- - 7.3 String expressions 4- - 7.4 Using data in expressions.............................................................................. 4- - 7.5 Using aggregates in expressions 4- - 7.6 Using function calls in expressions............................................................... 4- - 7.7 Priority between operators 4- - 7.8 Syntax............................................................................................................ 4- - 8 Error Recovery 4- - 8.1 Error handlers................................................................................................ 4- - 9 Interrupts.............................................................................................................. 4- - 9.1 Interrupt manipulation................................................................................... 4- - 9.2 Trap routines 4- - 10 Backward execution........................................................................................... 4- - 1.1 Backward handlers........................................................................................ 4- - 1.2 Limitation of move instructions in the backward handler 4- - 11 Multitasking........................................................................................................ 4- - 11.1 Synchronising the tasks............................................................................... 4- - 11.1 Synchronising using polling........................................................................ 4- - 11.1 Synchronising using an interrupt 4- - 11.2 Intertask communication............................................................................. 4- - 11.3 Type of task 4- - 11.4 Priorities 4- - 11.5 Trust Level 4- - 11.6 Task sizes..................................................................................................... 4- - 11.7 Something to think about 4- - 11.8 Programming scheme.................................................................................. 4- - 11.8 The first time. 4- - 11.8 Iteration phase. 4- - 11.8 Finnish phase............................................................................................... 4-
    • 5 Motion and I/O Principles 5-
      • 1 Coordinate Systems 5-
        • 1.1 The robot’s tool centre point (TCP) 5-
        • 1.2 Coordinate systems used to determine the position of the TCP 5-
        • 1.3 Coordinate systems used to determine the direction of the tool 5-
        • 1.4 Related information....................................................................................... 5-
      • 2 Positioning during Program Execution 5-
        • 2.1 General 5-
        • 2.2 Interpolation of the position and orientation of the tool 5-
    • 2.3 Interpolation of corner paths......................................................................... 5- 1-6 Overview
    • 2.4 Independent axes........................................................................................... 5-
    • 2.5 Soft Servo...................................................................................................... 5-
    • 2.6 Stop and restart 5-
    • 2.7 Related information 5-
  • 3 Synchronisation with logical instructions.......................................................... 5-
    • 3.1 Sequential program execution at stop points 5-
    • 3.2 Sequential program execution at fly-by points 5-
    • 3.3 Concurrent program execution 5-
    • 3.4 Path synchronisation 5-
    • 3.5 Related information 5-
  • 4 Robot Configuration............................................................................................ 5-
    • 4.1 Robot configuration data for 6400C 5-
    • 4.2 Related information 5-
  • 5 Robot kinematic models 5-
    • 5.1 Robot kinematics 5-
    • 5.2 General kinematics........................................................................................ 5-
    • 5.3 Related information 5-
  • 6 Motion Supervision/Collision Detection 5-
    • 6.1 Introduction................................................................................................... 5-
    • 6.2 Tuning of Collision Detection levels 5-
    • 6.3 Motion supervision dialogue box.................................................................. 5-
    • 6.4 Digital outputs............................................................................................... 5-
    • 6.5 Limitations 5-
    • 6.6 Related information 5-
  • 7 Singularities.......................................................................................................... 5-
    • 7.1 Singularity points/IRB 6400C....................................................................... 5-
    • 7.2 Program execution through singularities 5-
    • 7.3 Jogging through singularities........................................................................ 5-
    • 7.4 Related information 5-
  • 8 World Zones 5-
    • 8.1 Using global zones........................................................................................ 5-
    • 8.2 Using World Zones 5-
    • 8.3 Definition of World Zones in the world coordinate system.......................... 5-
    • 8.4 Supervision of the Robot TCP 5-
    • 8.5 Actions 5-
    • 8.6 Minimum size of World Zones. 5-
    • 8.7 Maximum number of World Zones............................................................... 5-
  • Overview 1- - 8.8 Power failure, restart, and run on.................................................................. 5- - 8.9 Related information....................................................................................... 5- - 9 I/O Principles........................................................................................................ 5- - 9.1 Signal characteristics..................................................................................... 5- - 9.2 System signals............................................................................................... 5- - 9.3 Cross connections 5- - 9.4 Limitations 5- - 9.5 Related information....................................................................................... 5-
    • 6 Programming Off-line.............................................................................. 6-
      • 1 Programming 6-
        • 1.1 File format..................................................................................................... 6-
        • 1.2 Editing........................................................................................................... 6-
        • 1.3 Syntax check 6-
        • 1.4 Examples....................................................................................................... 6-
        • 1.5 Making your own instructions 6-
    • 7 Predefined Data and Programs 7-
      • 1 System Module User 7-
        • 1.1 Contents 7-
        • 1.2 Creating new data in this module.................................................................. 7-
        • 1.3 Deleting this data 7-
    • 8 Index, Glossary 8-

Introduction

Overview 2-

Introduction

This is a reference manual containing a detailed explanation of the programming language as well as all data types , instructions and functions. If you are program- ming off-line, this manual will be particularly useful in this respect. When you start to program the robot it is normally better to start with the User’s Guide until you are familiar with the system.

1 Other Manuals

Before using the robot for the first time, you should read Basic Operation. This will provide you with the basics of operating the robot. The User’s Guide provides step-by-step instructions on how to perform various tasks, such as how to move the robot manually, how to program, or how to start a program when running production. The Product Manual describes how to install the robot, as well as maintenance pro- cedures and troubleshooting. This manual also contains a Product Specification which provides an overview of the characteristics and performance of the robot.

2 How to Read this Manual

To answer the questions Which instruction should I use? or What does this instruc- tion mean?, see RAPID Overview Chapter 3: RAPID Summary. This chapter briefly describes all instructions, functions and data types grouped in accordance with the instruction pick-lists you use when programming. It also includes a summary of the syntax, which is particularly useful when programming off-line. RAPID Overview Chapter 4: Basic Characteristics explains the inner details of the language. You would not normally read this chapter unless you are an experienced programmer. RAPID Overview Chapter 5: Motion and I/O Principles describes the various coor- dinate systems of the robot, its velocity and other motion characteristics during differ- ent types of execution. System DataTypes and Routines Chapters 1-3 describe all data types , instructions and functions. They are described in alphabetical order for your convenience. This manual describes all the data and programs provided with the robot on deliv- ery. In addition to these, there are a number of predefined data and programs sup- plied with the robot, either on diskette or, or sometimes already loaded. RAPID Overview Chapter 7: Predefined Data and Programs describes what hap- pens when these are loaded into the robot. If you program off-line, you will find some tips in RAPID Overview Chapter 6: Pro- gramming off-line. To make things easier to locate and understand, RAPID Overview chapter 8 con- tains an Index, Glossary and System DataTypes and Routines Chapter 4 contains an index.

Introduction

2-2 Overview

2.1 Typographic conventions The commands located under any of the five menu keys at the top of the teach pen- dant display are written in the form of Menu: Command. For example, to activate the Print command in the File menu, you choose File: Print. The names on the function keys and in the entry fields are specified in bold italic typeface, e.g. Modpos. Words belonging to the actual programming language, such as instruction names, are written in italics, e.g. MoveL. Examples of programs are always displayed in the same way as they are output to a diskette or printer. This differs from what is displayed on the teach pendant in the following ways:

  • Certain control words that are masked in the teach pendant display are printed, e.g. words indicating the start and end of a routine.
  • Data and routine declarations are printed in the formal form, e.g. VAR num reg1;.

2.2 Syntax rules Instructions and functions are described using both simplified syntax and formal syntax. If you use the teach pendant to program, you generally only need to know the simplified syntax, since the robot automatically makes sure that the correct syn- tax is used.

Simplified syntax Example:

  • Optional arguments are enclosed in square brackets [ ]. These arguments can be omitted.
  • Arguments that are mutually exclusive, i.e. cannot exist in the instruction at

the same time, are separated by a vertical bar |.

  • Arguments that can be repeated an arbitrary number of times are enclosed in braces { }.

TPWrite String [\Num] | [\Bool] | [\Pos] | [\Orient]

Instruction Compulsoryargument Optionalargument Mutually exclusive arguments

Introduction

2-4 Overview

RAPID Summary The Structure of the Language

Overview 3-

1 The Structure of the Language

The program consists of a number of instructions which describe the work of the robot. Thus, there are specific instructions for the various commands, such as one to move the robot, one to set an output, etc. The instructions generally have a number of associated arguments which define what is to take place in a specific instruction. For example, the instruction for resetting an output contains an argument which defines which output is to be reset; e.g. Reset do. These arguments can be specified in one of the following ways:

  • as a numeric value, e.g. 5 or 4.
  • as a reference to data, e.g. reg
  • as an expression, e.g. 5+reg1*
  • as a function call, e.g. Abs(reg1)
  • as a string value, e.g. "Producing part A" There are three types of routines – procedures , functions and trap routines.
  • A procedure is used as a subprogram.
  • A function returns a value of a specific type and is used as an argument of an instruction.
  • Trap routines provide a means of responding to interrupts. A trap routine can be associated with a specific interrupt; e.g. when an input is set, it is automati- cally executed if that particular interrupt occurs. Information can also be stored in data, e.g. tool data (which contains all information on a tool, such as its TCP and weight) and numerical data (which can be used, for example, to count the number of parts to be processed). Data is grouped into different data types which describe different types of information, such as tools, positions and loads. As this data can be created and assigned arbitrary names, there is no limit (except that imposed by memory) on the number of data. These data can exist either globally in the program or locally within a routine. There are three kinds of data – constants , variables and persistents.
  • A constant represents a static value and can only be assigned a new value man- ually.
  • A variable can also be assigned a new value during program execution.
  • A persistent can be described as a “persistent” variable. When a program is saved the initialization value reflects the current value of the persistent. Other features in the language are:
  • Routine parameters
  • Arithmetic and logical expressions
  • Automatic error handling
  • Modular programs
  • Multi tasking

RAPID Summary Controlling the Program Flow

Overview 3-

2 Controlling the Program Flow

The program is executed sequentially as a rule, i.e. instruction by instruction. Sometimes, instructions which interrupt this sequential execution and call another instruction are required to handle different situations that may arise during execution.

2.1 Programming principles

The program flow can be controlled according to five different principles:

  • By calling another routine (procedure) and, when that routine has been executed, continuing execution with the instruction following the routine call.
  • By executing different instructions depending on whether or not a given condition is satisfied.
  • By repeating a sequence of instructions a number of times or until a given condition is satisfied.
  • By going to a label within the same routine.
  • By stopping program execution.

2.2 Calling another routine

Instruction Used to: ProcCall Call (jump to) another routine CallByVar Call procedures with specific names RETURN Return to the original routine

2.3 Program control within the routine

Instruction Used to: Compact IF Execute one instruction only if a condition is satisfied IF Execute a sequence of different instructions depending on whether or not a condition is satisfied FOR Repeat a section of the program a number of times WHILE Repeat a sequence of different instructions as long as a given condition is satisfied TEST Execute different instructions depending on the value of an expression GOTO Jump to a label label Specify a label (line name)

Controlling the Program Flow RAPID Summary

3-4 Overview

2.4 Stopping program execution

Instruction Used to: Stop Stop program execution EXIT Stop program execution when a program restart is not allowed Break Stop program execution temporarily for debugging purposes

2.5 Stop current cycle

Instruction Used to: Exit cycle Stop the current cycle and move the program pointer to the first instruction in the main routine. When the execution mode CONT is selected, execution will continue with the next program cycle.