




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Simulador Robo ABB,nao tenho certeza se funciona no win 7,8,qualquer coisa instale uma maquina virtual com xp.Caso nao consigam instalar entre em contato. [email protected]
Tipologia: Notas de estudo
1 / 212
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































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
2-2 RAPID Developers Manual
This manual contains a formal description of the ABB Robotics robot programming language RAPID.
The RAPID language is aimed to support a levelled programming concept where new routines, data objects and data types may be installed at a specific IRB site. This con- cept makes it possible to customize (extend the functionality of) the programming en- vironment and must be fully supported by the programming language. In addition, with RAPID a number of powerful features are introduced:
Task - Modules An RAPID application is called a task. A task is composed of a set of modules. A mod- ule contains a set of data and routine declarations. The task buffer is used to host mod- ules currently in use (execution, development) on a system. RAPID distinguishes between task modules and s ystem modules. A task module is con- sidered to be a part of the task/application while a system module is considered to be a part of the “system”. System modules are automatically loaded to the task buffer during system start-up and are aimed to (pre)define common, system specific data objects (tools, weld data, move data ..), interfaces (printer, logfile ..) etc. While small applications usually are contained in a single task module (besides the sys- tem module/s), larger applications may have a "main" task module that in turn refer- ences routines and/or data contained in one or more other, "library" task modules. One task module contains the entry procedure of the task. Running the task really means that the entry routine is executed. Entry routines must be parameterless.
2-4 RAPID Developers Manual
The raise statement is used to raise and propagate errors. The exit statement terminates the evaluation of a task. The connect statement is used to allocate an interrupt number and associate it with a trap (interrupt service) routine. The retry and trynext statements are used to resume evaluation after an error. The if and test statements are used for selection. The if statement allows the selection of a statement list based on the value of a condition. The test statement selects one (or none) of a set of statement lists, depending on the value of an expression. The for and while statements are used for iteration. The for statement repeats the eval- uation of a statement list as long as the value of a loop variable is within a specified value range. The loop variable is updated (with selectable increment) at the end of each iteration. The while statement repeats the evaluation of a statement list as long as a con- dition is met. The condition is evaluated and checked at the beginning of each iteration.
Backward Execution RAPID supports stepwise, backward execution of statements. Backward execution is very useful for debugging, test and adjustment purposes during RAPID program devel- opment. RAPID procedures may contain a backward handler (statement list) that de- fines the backward execution "behaviour" of the procedure.
Error Recovery The occurrence of a runtime detected error causes suspension of normal program exe- cution. The control may instead be passed to a user provided error handler. An error handler may be included in any routine declaration. The handler can obtain information about the error and possibly take some actions in response to it. If desirable, the error handler can return the control to the statement that caused the error (retry) or to the statement after the statement that caused the error (trynext) or to the point of the call of the routine. If further execution is not possible, at least the error handler can assure that the task is given a graceful abortion.
Interrupts Interrupts occur as a consequence of a user defined (interrupt) condition turning true. Unlike errors, interrupts are not directly related to (synchronous with) the execution of a specific piece of the code. The occurrence of an interrupt causes suspension of normal program execution and the control may be passed to a trap routine. After necessary ac- tions have been taken in response to the interrupt the trap routine can resume execution at the point of the interrupt.
Data Types Any RAPID object (value, expression, variable, function etc.) has a data type. A data type can either be a built-in type or an installed type (compare installed routines) or a
RAPID Developers Manual 2-
user-defined (defined in RAPID) type. Built-in types are a part of the RAPID lan- guage while the set of installed or user-defined types may differ from site to site. From the users point of view there is no difference between built-in , installed and user-de- fined types. There are three different kinds of types - atomic types , record types and alias types. The definition of a atomic type has to be build-in or installed, but a record or alias type could also be user-defined. Atomic types are "atomic" in the sense that they are not defined upon any other type and they can not be divided into parts or components. Record types are built up by a set of named, ordered components. An alias type is by definition equal to another type. Alias types make it possible to classify data objects. In addition to the atomic, record or alias classification of types, each type has a value class. There are three value classes of types - value types, nonvalue types and semival- ue types. An object of value type is simply considered to represent some form of "val- ue" (e.g, 3.55 or "John Smith" ). A nonvalue (type) object instead represents a hidden/ encapsulated description of some physical or logical object, e.g. a file. Semivalue ob- jects are somewhat special. They really have two types, one "basic" nonvalue type and one associated value type that may be used to represent some property of the nonvalue type.
Built-in Data Types The built-in atomic types are bool , num and string. Bool is an enumerated type with the value domain { TRUE , FALSE } and provides a means of performing logical and relational computations. The num type supports exact and approximate arithmetic computations. The string type represents character sequences. The built-in record types are pos , orient a nd pose. The pos type represents a position in space (vector). The orient type represents an orientation in space. The pose type rep- resents a coordinate system (position/orientation combination). The built-in alias types are errnum and intnum. Errnum and intnum are both aliases for num and are used to represent error and interrupt numbers. Operations on objects of built-in types are defined by means of arithmetic, relational and logical operators and predefined routines.
Installed Data Types The concept of installed types supports the use of installed routines by making it pos- sible to use appropriate parameter types. An installed type can be either an Atomic, Record or Alias type.
User-defined Data Types The user-defined types makes its easear to custimize a application program. It make it also possibilly to write a RAPID program more readable.
RAPID Developers Manual 2-
prior to program execution after program modification.
2-8 RAPID Developers Manual
This chapter defines the lexical elements of RAPID.
Sentences of the RAPID language are constructed using the standard ISO 8859-1 char- acter set. In addition newline , tab and formfeed control characters are recognized.
| Ù | Ú | Û | Ü | 2)^ | 3)^ | ß
An RAPID sentence is a sequence of lexical units - tokens. The RAPID tokens are: