IRC5-Rapid Overview 3HAC16580-1 RevB en Library

Embed Size (px)

Citation preview

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    1/228

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    2/228

    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 orwarranty 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 describedherein.

    This manual and parts thereof must not be reproduced or copied without ABBs 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 ABB All right reserved.

    ABB Automation Technologies ABRobotics

    SE-721 68 VstersSweden

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    3/228

    I

    1.1 Other manuals................................................................................................................... 1

    1.2 How to read this manual ................................................................................................... 1

    Typographic conventions .................................................................................................2Syntax rules......................................................................................................................2

    Formal syntax................................................................................................................... 3

    3.1 Programming principles ................................................................................................... 7

    3.2 Calling another routine ..................................................................................................... 7

    3.3 Program control within the routine................................................................................... 7

    3.4 Stopping program execution............................................................................................. 8

    3.5 Stop current cycle .............................................................................................................8

    4.1 Assigning a value to data.................................................................................................. 9

    4.2 Wait...................................................................................................................................9

    4.3 Comments......................................................................................................................... 9

    4.4 Loading program modules.............................................................................................. 10

    4.5 Various functions ............................................................................................................ 10

    4.6 Basic data........................................................................................................................ 10

    4.7 Conversion function ....................................................................................................... 11

    5.1 Programming principles ................................................................................................. 13

    5.2 Maximum TCP speed ..................................................................................................... 13

    5.3 Defining velocity ............................................................................................................ 14

    5.4 Defining acceleration...................................................................................................... 14

    5.5 Defining configuration management .............................................................................. 14

    5.6 Defining the payload ...................................................................................................... 14

    5.7 Defining the behaviour near singular points................................................................... 155.8 Displacing a program...................................................................................................... 15

    5.9 Soft servo........................................................................................................................ 15

    5.10 Adjust the robot tuning values...................................................................................... 16

    5.11 World zones .................................................................................................................. 17

    5.12 Data for motion settings ............................................................................................... 17

    6.1 Programming principles ................................................................................................. 19

    6.2 Positioning instructions .................................................................................................. 206.3 Searching ........................................................................................................................ 20

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    4/228

    II

    6.4 Activating outputs or interrupts at specific positions..................................................... 21

    6.5 Control of analog output signal proportional to actual TCP .......................................... 21

    6.6 Motion control if an error/interrupt takes place ............................................................. 22

    6.7 Get robot info in a MultiMove system ........................................................................... 226.8 Controlling external axes................................................................................................ 22

    6.9 Independent axes ............................................................................................................ 23

    6.10 Path correction.............................................................................................................. 24

    6.11 Path Recorder ............................................................................................................... 24

    6.12 Conveyor tracking ........................................................................................................ 25

    6.13 Sensor synchronization................................................................................................. 25

    6.14 Load identification and collision detection .................................................................. 25

    6.15 Position functions ......................................................................................................... 26

    6.16 Check interrupted path after power failure................................................................... 26

    6.17 Status functions ............................................................................................................ 26

    6.18 Motion data................................................................................................................... 27

    6.19 Basic data for movements ............................................................................................ 27

    7.1 Programming principles ................................................................................................. 29

    7.2 Changing the value of a signal ....................................................................................... 29

    7.3 Reading the value of an input signal .............................................................................. 29

    7.4 Error handling................................................................................................................. 307.5 Reading the value of an output signal ............................................................................ 30

    7.6 Testing input on output signals....................................................................................... 30

    7.7 Disabling and enabling I/O modules .............................................................................. 30

    7.8 Defining input and output signals .................................................................................. 31

    7.9 Get status of I/O bus and unit ......................................................................................... 31

    8.1 Programming principles ................................................................................................. 33

    8.2 Communicating using the FlexPendant, function group TP .......................................... 338.3 Communicating using the FlexPendant, function group UI........................................... 34

    8.4 Reading from or writing to a character-based serial channel/file................................... 35

    8.5 Communicating using binary serial channels/files/field buses ...................................... 35

    8.6 Conversion...................................................................................................................... 36

    8.7 Data for serial channels/files/field buses........................................................................ 36

    8.8 Communicating using binary serial channel with a link protocol.................................. 36

    8.9 Socket messaging communication between computers ................................................. 37

    9.1 Programming principles ................................................................................................. 39

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    5/228

    III

    9.2 Connecting interrupts to trap routines ............................................................................ 39

    9.3 Ordering interrupts ......................................................................................................... 40

    9.4 Cancelling interrupts....................................................................................................... 40

    9.5 Enabling/disabling interrupts..........................................................................................409.6 Interrupt data................................................................................................................... 40

    9.7 Data type of interrupts .................................................................................................... 41

    10.1 Programming principles ............................................................................................... 43

    10.2 Creating an error situation from within the program.................................................... 43

    10.3 Booking an error number..............................................................................................43

    10.4 Restarting/returning from the error handler.................................................................. 44

    10.5 User defined errors and warnings................................................................................. 44

    10.6 Generate process error .................................................................................................. 44

    10.7 Data for error handling ................................................................................................. 44

    10.8 Configuration for error handling .................................................................................. 44

    11.1 Programming principles................................................................................................ 47

    11.2 Using a clock to time an event...................................................................................... 47

    11.3 Reading current time and date ......................................................................................47

    11.4 Retrieve time information from file.............................................................................. 48

    11.5 Get the size of free program memory........................................................................... 48

    12.1 Programming principles ............................................................................................... 49

    12.2 Simple calculations on numeric data ............................................................................ 49

    12.3 More advanced calculations ......................................................................................... 49

    12.4 Arithmetic functions ..................................................................................................... 50

    12.5 Bit functions ................................................................................................................. 51

    13.1 Programming principles ............................................................................................... 5313.2 Sending a program-controlled message from the robot to a computer......................... 53

    15.1 Get system data............................................................................................................. 57

    15.2 Get information about the system................................................................................. 57

    15.3 Get information about memory .................................................................................... 58

    15.4 configuration data ............................................................................................... 58

    15.5 configuration data .............................................................................................. 5815.6 Restart the controller .................................................................................................... 58

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    6/228

    IV

    15.7 Text tables instructions ................................................................................................. 58

    15.8 Get object name............................................................................................................ 59

    15.9 Get task name ............................................................................................................... 59

    15.10 Search for symbols ..................................................................................................... 60

    16.1 Calibration of the tool................................................................................................... 61

    16.2 Various calibration methods ......................................................................................... 61

    16.3 Directing a value to the robots test signal ................................................................... 61

    16.4 Recording of an execution............................................................................................ 62

    17.1 Basic operations ........................................................................................................... 63

    17.2 Comparison and searching ........................................................................................... 63

    17.3 Conversion.................................................................................................................... 64

    18.1 Basics............................................................................................................................ 65

    18.2 General instructions and functions ............................................................................... 65

    18.3 Multi Move System with coordinated robots ............................................................... 66

    19.1 Instructions ................................................................................................................... 67

    19.2 Functions ...................................................................................................................... 79

    20.1 Identifiers...................................................................................................................... 87

    20.2 Spaces and new-line characters .................................................................................... 88

    20.3 Numeric values............................................................................................................. 88

    20.4 Logical values............................................................................................................... 88

    20.5 String values ................................................................................................................. 88

    20.6 Comments..................................................................................................................... 89

    20.7 Placeholders.................................................................................................................. 89

    20.8 File header .................................................................................................................... 9020.9 Syntax ........................................................................................................................... 90

    21.1 Program modules.......................................................................................................... 93

    21.2 System modules............................................................................................................ 94

    21.3 Module declarations ..................................................................................................... 94

    21.4 Syntax ........................................................................................................................... 95

    22.1 Routine scope ............................................................................................................... 9722.2 Parameters .................................................................................................................... 98

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    7/228

    V

    22.3 Routine termination ...................................................................................................... 99

    22.4 Routine declarations ..................................................................................................... 99

    22.5 Procedure call ............................................................................................................. 100

    22.6 Syntax ......................................................................................................................... 101

    23.1 Non-value data types .................................................................................................. 105

    23.2 Equal (alias) data types............................................................................................... 105

    23.3 Syntax ......................................................................................................................... 106

    24.1 Data scope................................................................................................................... 107

    24.2 Variable declaration .................................................................................................... 108

    24.3 Persistent declaration .................................................................................................. 109

    24.4 Constant declaration ................................................................................................... 109

    24.5 Initiating data .............................................................................................................. 110

    24.6 Storage class ............................................................................................................... 111

    24.7 Syntax ......................................................................................................................... 112

    25.1 Syntax ......................................................................................................................... 113

    26.1 Arithmetic expressions ............................................................................................... 115

    26.2 Logical expressions .................................................................................................... 11626.3 String expressions ....................................................................................................... 117

    26.4 Using data in expressions ........................................................................................... 117

    Arrays........................................................................................................................... 117

    Records......................................................................................................................... 117

    26.5 Using aggregates in expressions ................................................................................. 118

    26.6 Using function calls in expressions ............................................................................ 118

    26.7 Priority between operators.......................................................................................... 119

    Example .......................................................................................................................12026.8 Syntax ......................................................................................................................... 120

    Expressions ..................................................................................................................120

    Operators ......................................................................................................................120

    Constant values ............................................................................................................120

    Data ..............................................................................................................................121

    Aggregates ................................................................................................................... 121

    Function calls ...............................................................................................................121

    Special expressions ......................................................................................................122Parameters....................................................................................................................122

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    8/228

    VI

    27.1 Error handlers ............................................................................................................. 123

    System error handler .................................................................................................... 124

    Errors raised by the program........................................................................................ 124The event log................................................................................................................ 124

    28.1 Definitions/terminology ............................................................................................. 125

    28.2 When to use UNDO ................................................................................................... 125

    28.3 UNDO behavior in detail ........................................................................................... 125

    28.4 Limitations.................................................................................................................. 126

    28.5 Example ...................................................................................................................... 127

    29.1 Interrupt manipulation ................................................................................................ 129

    29.2 Trap routines............................................................................................................... 130

    30.1 Backward handlers ..................................................................................................... 131

    30.2 Limitation of move instructions in the backward handler.......................................... 132

    30.3 Behavior of the backward execution .......................................................................... 133

    MoveC and nostepin routines ...................................................................................... 133

    Target, movement type and speed ................................................................................ 133

    Example ....................................................................................................................... 134

    31.1 Synchronising the tasks .............................................................................................. 138

    Synchronising using polling ........................................................................................ 138

    Synchronising using an interrupt ................................................................................. 139

    31.2 Intertask communication ............................................................................................ 139

    31.3 Type of task ................................................................................................................ 140

    31.4 Priorities ..................................................................................................................... 141

    31.5 Trust Level.................................................................................................................. 14231.6 Something to think about ........................................................................................... 143

    31.7 Programming scheme ................................................................................................. 143

    The first time ................................................................................................................ 143

    Iteration phase..............................................................................................................143

    Finish phase ................................................................................................................. 144

    32.1 The robots tool centre point (TCP) ........................................................................... 145

    32.2 Coordinate systems used to determine the position of the TCP................................. 145Base coordinate system................................................................................................ 145

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    9/228

    VII

    World coordinate system..............................................................................................146

    User coordinate system ................................................................................................147

    Object coordinate system.............................................................................................147

    Displacement coordinate system..................................................................................148Coordinated external axes............................................................................................149

    32.3 Coordinate systems used to determine the direction of the tool................................. 150

    Wrist coordinate system...............................................................................................151

    Tool coordinate system ................................................................................................ 151

    Stationary TCPs ...........................................................................................................152

    32.4 Related information .................................................................................................... 154

    33.1 General........................................................................................................................ 155

    33.2 Interpolation of the position and orientation of the tool.............................................155

    Joint interpolation .......................................................................................................155

    Linear interpolation ......................................................................................................156

    Circular interpolation ................................................................................................... 157

    SingArea\Wrist.............................................................................................................158

    33.3 Interpolation of corner paths.......................................................................................159

    Joint interpolation in corner paths................................................................................160

    Linear interpolation of a position in corner paths........................................................160

    Linear interpolation of the orientation in corner paths ................................................ 161Interpolation of external axes in corner paths..............................................................162

    Corner paths when changing the interpolation method ............................................... 162

    Interpolation when changing coordinate system..........................................................162

    Corner paths with overlapping zones...........................................................................163

    Planning time for fly-by points ....................................................................................164

    33.4 Independent axes ........................................................................................................ 164

    Program execution .......................................................................................................164

    Stepwise execution .......................................................................................................165Jogging .........................................................................................................................165

    Working range .............................................................................................................. 165

    Speed and acceleration.................................................................................................166

    Robot axes.................................................................................................................... 166

    33.5 Soft Servo ................................................................................................................... 167

    33.6 Stop and restart ...........................................................................................................167

    33.7 Related information .................................................................................................... 168

    34.1 Sequential program execution at stop points .............................................................. 169

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    10/228

    VIII

    34.2 Sequential program execution at fly-by points........................................................... 169

    34.3 Concurrent program execution ................................................................................... 170

    34.4 Path synchronisation................................................................................................... 173

    34.5 Related information .................................................................................................... 174

    35.1 Different types of robot configurations ...................................................................... 175

    35.2 Specifying robot configuration................................................................................... 177

    35.3 Configuration check ................................................................................................... 177

    35.4 Related information .................................................................................................... 178

    36.1 Robot kinematics ........................................................................................................ 179

    Master robot ................................................................................................................. 179

    External robot............................................................................................................... 180

    36.2 General kinematics ..................................................................................................... 181

    36.3 Related information .................................................................................................... 183

    37.1 Introduction ................................................................................................................ 185

    37.2 Tuning of collision detection levels............................................................................ 185

    37.3 Motion supervision dialogue box ............................................................................... 187

    37.4 Digital outputs ............................................................................................................ 187

    37.5 Limitations.................................................................................................................. 18737.6 Related information .................................................................................................... 188

    Singularity points of IRB140....................................................................................... 190

    38.1 Program execution through singularities .................................................................... 190

    38.2 Jogging through singularities ..................................................................................... 190

    38.3 Related information .................................................................................................... 191

    40.1 Using global zones ..................................................................................................... 195

    40.2 Using world zones ...................................................................................................... 195

    40.3 Definition of world zones in the world coordinate system ........................................ 195

    40.4 Supervision of the robot TCP..................................................................................... 196

    Stationary TCPs ........................................................................................................... 196

    40.5 Actions........................................................................................................................ 197

    Set a digital output when the tcp is inside a world zone. ............................................. 197

    Set a digital output before the tcp reaches a world zone.............................................. 197Stop the robot before the tcp reaches a world zone. .................................................... 197

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    11/228

    IX

    40.6 Minimum size of world zones. ................................................................................... 198

    40.7 Maximum number of world zones..............................................................................198

    40.8 Power failure, restart, and run on ............................................................................... 198

    40.9 Related information .................................................................................................... 199

    41.1 Signal characteristics .................................................................................................. 201

    41.2 Signals connected to interrupt .................................................................................... 202

    41.3 System signals ............................................................................................................203

    41.4 Cross connections ....................................................................................................... 203

    41.5 Limitations.................................................................................................................. 204

    41.6 Related information .................................................................................................... 204

    42.1 Contents ...................................................................................................................... 205

    43.1 File format .................................................................................................................. 207

    43.2 Editing ........................................................................................................................ 207

    43.3 Syntax check............................................................................................................... 207

    43.4 Examples .................................................................................................................... 208

    43.5 Making your own instructions .................................................................................... 209

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    12/228

    X

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    13/228

    1

    This is a reference manual containing a detailed explanation of the programming

    language as well as all , and. If you are programmingoff-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 Operatorsmanual - IRC5 with FlexPendant until you are familiar with the system.

    Beforeusing the robot for the first time, you should read . This willprovide you with the basics of operating the robot.

    provides step-by-step instructions onhow to perform various tasks, such as how to move the robot manually, how toprogram, or how to start a program when running production.

    describes how to install the robot, as well as maintenanceprocedures and troubleshooting. This manual also contains a which provides an overview of the characteristics and performance of the robot.

    To answer the questions or see . This chapter brieflydescribes all instructions, functions and data types grouped in accordance with theinstruction pick-lists you use when programming. It also includes a summary of thesyntax, which is particularly useful when programming off-line.

    explains the inner details of thelanguage. You would not normally read this chapter unless you are an experiencedprogrammer.

    describes the variouscoordinate systems of the robot, its velocity and other motion characteristics duringdifferent types of execution.

    describe all and . They are described in alphabetical order for yourconvenience.

    This manual describes all the data and programs provided with the robot on delivery.In addition to these, there are a number of predefined data and programs supplied withthe robot, either on diskette or, or sometimes already loaded.

    describes what happens

    when these are loaded into the robot.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    14/228

    2

    If you program off-line, you will find some tips in .

    To make things easier to locate and understand, containsan and contains an in the end.

    The commands located under any of the five menu keys at the top of the FlexPendantdisplay are written in the form of . For example, to activate the Printcommand in the File menu, you choose .

    The names on the function keys and in the entry fields are specified in bold italictypeface, e.g..

    Words belonging to the actual programming language, such as instruction names, arewritten in italics, e.g..

    Examples of programs are always displayed in the same way as they are output to adiskette or printer. This differs from what is displayed on the FlexPendant in thefollowing ways:

    - Certain control words that are masked in the FlexPendant 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. .

    Instructions and functions are described using both simplified syntax and formalsyntax. If you use the FlexPendant to program, you generally only need to know thesimplified syntax, since the robot automatically makes sure that the correct syntax isused.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    15/228

    3

    Example:

    - Optional arguments are enclosed in square brackets [ ]. These arguments can beomitted.

    - Arguments that are mutually exclusive, i.e. cannot exist in the instruction at thesame time, are separated by a vertical bar .

    - Arguments that can be repeated an arbitrary number of times are enclosed inbraces { }.

    Example: TPWrite[String:=] [\Num:= ] |[\Bool:= ] |[\Pos:= ] |[\Orient:= ];

    - The text within the square brackets [ ] may be omitted.

    - Arguments that are mutually exclusive, i.e. cannot exist in the instruction at thesame time, are separated by a vertical bar .

    - Arguments that can be repeated an arbitrary number of times are enclosed inbraces { }.

    - Symbols that are written in order to obtain the correct syntax are enclosed insingle quotation marks (apostrophes) .

    - The data type of the argument (italics) and other characteristics are enclosed inangle brackets < >. See the description of the parameters of a routine for more

    detailed information.

    The basic elements of the language and certain instructions are written using a specialsyntax, EBNF. This is based on the same rules, but with some additions.

    Example: GOTO ; ::=

    | ::= { | | _}

    - The symbol ::= means .

    - Text enclosed in angle brackets < > is defined in a separate line.

    Instruction Optionalargument

    Compulsoryargument

    Mutuallyexclusivearguments

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    16/228

    4

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    17/228

    5

    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 therobot, one to set an output, etc.

    The instructions generally have a number of associated arguments which define whatis to take place in a specific instruction. For example, the instruction for resetting anoutput contains an argument which defines which output is to be reset; e.g. .These arguments can be specified in one of the following ways:

    - as a numeric value, e.g. or

    - as a reference to data, e.g. - as an expression, e.g.

    - as a function call, e.g.- as a string value, e.g.

    There are three types of routines ,and .

    - A procedure is used as a subprogram.

    - A function returns a value of a specific type and is used as an argument of aninstruction.

    - Trap routines provide a means of responding to interrupts. A trap routine canbe associated with a specific interrupt; e.g. when an input is set, it is

    automatically executed if that particular interrupt occurs.Information can also be stored in data, e.g. tool data (which contains all information ona 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 typeswhich describe different types of information, such as tools, positions and loads. Asthis data can be created and assigned arbitrary names, there is no limit (except thatimposed by memory) on the number of data. These data can exist either globally in theprogram or locally within a routine.

    There are three kinds of data , and.

    - A constant represents a static value and can only be assigned a new valuemanually.

    - A variable can also be assigned a new value during program execution.

    - A persistent can be described as a persistent variable. When a program issaved the initialization value reflects the current value of the persistent.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    18/228

    6

    Other features in the language are:

    - Routine parameters

    - Arithmetic and logical expressions

    - Automatic error handling- Modular programs- Multi tasking

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    19/228

    7

    The program is executed sequentially as a rule, i.e. instruction by instruction.

    Sometimes, instructions which interrupt this sequential execution and call anotherinstruction are required to handle different situations that may arise during execution.

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

    - By calling another routine (procedure) and, when that routine has beenexecuted, continuing execution with the instruction following the routine call.

    - By executing different instructions depending on whether or not a givencondition is satisfied.

    - By repeating a sequence of instructions a number of times or until a givencondition is satisfied.

    - By going to a label within the same routine.

    - By stopping program execution.

    Instruction Used to: Call (jump to) another routine

    Call procedures with specific names

    Return to the original routine

    Instruction Used to:

    Execute one instruction only if a condition is satisfied Execute a sequence of different instructions depending on

    whether or not a condition is satisfied

    Repeat a section of the program a number of times

    Repeat a sequence of different instructions as long as a givencondition is satisfied

    Execute different instructions depending on the value of anexpression

    Jump to a label

    Specify a label (line name)

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    20/228

    8

    Instruction Used to:

    Stop program execution Stop program execution when a program restart is not allowed

    Stop program execution temporarily for debugging purposes

    Instruction Used to:

    Stop the current cycle and move the program pointer to the firstinstruction in the main routine. When the execution mode is selected, execution will continue with the nextprogram cycle.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    21/228

    9

    Various instructions are used to

    - assign values to data

    - wait a given amount of time or wait until a condition is satisfied

    - insert a comment into the program

    - load program modules.

    Data can be assigned an arbitrary value. It can, for example, be initialised with aconstant value, e.g. 5, or updated with an arithmetic expression, e.g. .

    Instruction Used to:

    Assign a value to data

    The robot can be programmed to wait a given amount of time, or to wait until anarbitrary condition is satisfied; for example, to wait until an input is set.

    Instruction Used to:

    Wait a given amount of time or to wait until the robot stopsmoving

    Wait until a condition is satisfied

    Wait until a digital input is set

    Wait until a digital output is set

    Comments are only inserted into the program to increase its readability. Programexecution is not affected by a comment.

    Instruction Used to:

    Comment on the program

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    22/228

    10

    Program modules can be loaded from mass memory or erased from the programmemory. In this way large programs can be handled with only a small memory.

    Instruction Used to:

    Load a program module into the program memory

    Unload a program module from the program memory

    Load a program module into the program memory duringexecution

    Connect the module, if loaded with , to theprogram task

    Cancel the loading of a module that is being or has been loaded

    with the instruction Save a program module

    Erase a module from the program memory.

    Data type Used to:

    Program a load session

    Function Used to:

    Read the current operating mode of the robot

    Read the current program execution mode of the robot

    Read the current Non-Motion execution mode of the programtask

    Obtain the dimensions of an array

    Find out whether an optional parameter was present when aroutine call was made

    Check whether a parameter is a persistent Check whether a parameter is a variable

    Data type Used to define:

    Logical data (with the values true or false)

    Numeric values (decimal or integer)

    Numeric data with symbolic value

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    23/228

    11

    Character strings

    Routine parameters without value

    Function Used to:

    Convert a byte to a string data with a defined byte data format.

    Convert a string with a defined byte data format to a byte data.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    24/228

    12

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    25/228

    13

    Some of the motion characteristics of the robot are determined using logical

    instructions that apply to all movements:- Maximum TCP speed

    - Maximum velocity and velocity override

    - Acceleration

    - Management of different robot configurations

    - Payload

    - Behaviour close to singular points

    - Program displacement

    - Soft servo

    - Tuning values

    The basic characteristics of the robot motion are determined by data specified for eachpositioning instruction. Some data, however, is specified in separate instructions whichapply to all movements until that data changes.

    The general motion settings are specified using a number of instructions, but can alsobe read using the system variable or .

    Default values are automatically set (by executing the routine in systemmodule BASE)

    - at a cold start-up,

    - when a new program is loaded,

    - when the program is started from the beginning.

    Function Used to:

    Return the maximum TCP speed for the used robot type

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    26/228

    14

    The absolute velocity is programmed as an argument in the positioning instruction. Inaddition to this, the maximum velocity and velocity override (a percentage of theprogrammed velocity) can be defined.

    Instruction Used to define:

    The maximum velocity and velocity override

    When fragile parts, for example, are handled, the acceleration can be reduced for partof the program.

    Instruction Used to:

    Define the maximum acceleration.

    Limiting the acceleration/deceleration of the tool (andgripload) in the world coordinate system.

    Set or reset limitations on TCP acceleration and/or TCPdeceleration along the movement path.

    The robots configuration is normally checked during motion. If joint (axis-by-axis)motion is used, the correct configuration will be achieved. If linear or circular motionare used, the robot will always move towards the closest configuration, but a check isperformed to see if it is the same as the programmed one. It is possible to change this,however.

    Instruction Used to define:

    Configuration control on/off during joint motion

    Configuration check on/off during linear motion

    To achieve the best robot performance, the correct payload must be defined.

    Instruction Used to define:

    The payload of the gripper

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    27/228

    15

    The robot can be programmed to avoid singular points by changing the tool orientationautomatically.

    Instruction Used to define:

    The interpolation method through singular points

    When part of the program must be displaced, e.g. following a search, a programdisplacement can be added.

    Instruction Used to: Activate program displacement

    Activate program displacement by specifying a value

    Deactivate program displacement

    Activate an external axis offset

    Activate an external axis offset by specifying a value

    Deactivate an external axis offset

    Function Used to:

    Calculate a program displacement from three positions

    Calculate a program displacement from six positions

    Remove program displacement from a position

    Define a frame from original positions and displaced positions

    One or more of the robot axes can be made soft. When using this function, the robotwill be compliant and can replace, for example, a spring tool.

    Instruction Used to:

    Activate the soft servo for one or more axes

    Deactivate the soft servo

    1 Enables dither functionality for soft servo

    Disables dither functionality for soft servo

    1. Only for IRB 7600

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    28/228

    16

    In general, the performance of the robot is self-optimising; however, in certain extremecases, overrunning, for example, can occur. You can adjust the robot tuning values toobtain the required performance.

    Instruction Used to:

    Adjust the robot tuning values

    Reset tuning to normal

    Adjust the geometric path resolution

    Choose the way the tool reorientates during circularinterpolation.

    Data type Used to: Represent the tuning type as a symbolic constant

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    29/228

    17

    Up to 10 different volumes can be defined within the working area of the robot. Thesecan be used for:

    - Indicating that the robots TCP is a definite part of the working area.

    - Delimiting the working area for the robot and preventing a collision with thetool.

    - Creating a working area common to two robots. The working area is thenavailable only to one robot at a time.

    Instruction Used to:

    Define a box-shaped global zone

    Define a cylindrical global zone Define a spherical global zone

    Define a global zone in joints coordinates

    Define a global zone in joints coordinates for limitation ofworking area.

    Activate limit supervision for a global zone

    Activate global zone to set digital outputs

    Deactivate supervision of a temporary global zone

    Activate supervision of a temporary global zone

    Erase supervision of a temporary global zone

    Identify a temporary global zone

    Identify a stationary global zone

    Describe the geometry of a global zone

    Data type Used to define:

    Motion settings except program displacement

    Program displacement

    1. Only when the robot is equipped with the option World zones

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    30/228

    18

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    31/228

    19

    The robot movements are programmed as pose-to-pose movements, i.e. move from

    the current position to a new position. The path between these two positions is thenautomatically calculated by the robot.

    The basic motion characteristics, such as the type of path, are specified by choosingthe appropriate positioning instruction.

    The remaining motion characteristics are specified by defining data which arearguments of the instruction:

    - Position data (end position for robot and external axes)

    - Speed data (desired speed)

    - Zone data (position accuracy)

    - Tool data (e.g. the position of the TCP)

    - Work-object data (e.g. the current coordinate system)

    Some of the motion characteristics of the robot are determined using logicalinstructions which apply to all movements (See on page 13):

    - Maximum velocity and velocity override- Acceleration

    - Management of different robot configurations

    - Payload

    - Behaviour close to singular points

    - Program displacement

    - Soft servo

    - Tuning values

    Both the robot and the external axes are positioned using the same instructions. Theexternal axes are moved at a constant velocity, arriving at the end position at the sametime as the robot.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    32/228

    20

    Instruction Type of movement:

    TCP moves along a circular path Joint movement

    TCP moves along a linear path

    Absolute joint movement

    Moves a linear or rotational external axis without TCP

    Moves the robot circularly and sets a digital output in themiddle of the corner path.

    Moves the robot by joint movement and sets a digital output inthe middle of the corner path.

    Moves the robot linearly and sets a digital output in the middleof the corner path.

    Moves the robot circularly and executes a RAPID procedure

    Moves the robot by joint movement and executes a RAPIDprocedure

    Moves the robot linearly and executes a RAPID procedure

    During the movement, the robot can search for the position of a work object, forexample. The searched position (indicated by a sensor signal) is stored and can be usedlater to position the robot or to calculate a program displacement.

    Instruction Type of movement:

    TCP along a circular path

    TCP along a linear path

    1. Only if the robot is equipped with the option Fixed position events

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    33/228

    21

    Normally, logical instructions are executed in the transition from one positioninginstruction to another. If, however, special motion instructions are used, these can beexecuted instead when the robot is at a specific position.

    Instruction Used to:

    1 Define a trigg condition to set an output at a given position

    1 Define a trigg condition to execute a trap routine at a givenposition

    1 Define an IO check at a given position

    1 Define a trigg condition to set an output at a given positionwith the possibility to include time compensation for the lag in

    the external equipment1 Run the robot (TCP) circularly with an activated trigg

    condition

    1 Run the robot axis-by-axis with an activated trigg condition

    1 Run the robot (TCP) linearly with an activated trigg condition

    2 Move backwards on its path in a RESTART event routine

    Create an internal supervision process in the system for zerosetting of specified process signals and the generation of restartdata in a specified persistent variable at every program stop

    (STOP) or emergency stop (QSTOP) in the system.Data type Used to define:

    1 Trigg conditions

    3 Analogue I/O trigger condition

    Data for

    Define conditions and actions for control of an analog outputsignal with output value proportional to the actual TCP speed.

    1. Only if the robot is equipped with the option Fixed position events2. Only if the robot is equipped with the option Advanced RAPID3. Only if the robot is equipped with the option Analog signal interrupt

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    34/228

    22

    In order to rectify an error or an interrupt, motion can be stopped temporarily and thenrestarted again.

    Instruction Used to:

    Stop the robot movements

    Restart the robot movements

    Restart the robot movements and make a retry in oneindivisible sequence

    Reset the stop move status, but dont start the robot movements

    1 Store the last path generated

    1

    Regenerate a path stored earlier Clear the whole motion path on the current motion path level.

    Used to retrieve name or reference to the robot in current program task.

    Function Used to:

    Get the controlled robot name in current program task, if any.

    Data Used to:

    ROB_ID Get data containing a reference to the controlled robot incurrent program task, if any.

    The robot and external axes are usually positioned using the same instructions. Someinstructions, however, only affect the external axis movements.

    Instruction Used to: Deactivate an external mechanical unit

    Activate an external mechanical unit

    Defines a payload for a mechanical unit

    Function Used to:

    Retrieving name of mechanical units in the robot system

    Check whether a mechanical unit is activated or not

    1. Only if the robot is equipped with the option Path recovery

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    35/228

    23

    The robot axis 6 (and 4 on IRB 2400 /4400) or an external axis can be movedindependently of other movements. The working area of an axis can also be reset,which will reduce the cycle times.

    Function Used to:

    1 Change an axis to independent mode and move the axis to anabsolute position

    1 Change an axis to independent mode and start the axis movingcontinuously

    1 Change an axis to independent mode and move the axis a deltadistance

    IndRMove1

    Change an axis to independent mode and move the axis to arelative position (within the axis revolution)

    IndReset1 Change an axis to dependent mode or/and reset the workingarea

    IndInpos1 Check whether an independent axis is in position

    IndSpeed1 Check whether an independent axis has reached programmedspeed

    Instruction Used to:

    HollowWristReset2 Reset the position of the wrist joints on hollow wrist

    manipulators, such as IRB 5402 and IRB 5403.

    1. Only if the robot is equipped with the option Independent movement.2. Only if the robot is equiped with the option Independent movement. The Instruction HollowWristResetcan only be used on Robot IRB 5402 AND IRB 5403.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    36/228

    24

    Instruction Used to:

    1

    Connect to a correction generatorCorrWrite1 Write offsets in the path coordinate system to a correction

    generator

    1 Disconnect from a previously connected correction generator

    1 Remove all connected correction generators

    Function Used to:

    1 Read the total corrections delivered by all connected correctiongenerators

    Data type Used to:1 Add geometric offsets in the path coordinate system

    Instruction Used to:

    Start recording the robots path

    Stop recording the robots path

    Move the robot backwards along a recorded path Move the robot back to the position where

    was executed

    Function Used to:

    Check if the path recorder is active and if a recorded backwardpath is available

    Check if the path recorder can be used to move forward

    Data type Used to:

    Identify a breakpoint for the path recorder

    1. Only if the robot is eqiped with the option Path offset or RobotWare-Arc sensor.2. Only if the robot is equipped with the option Path recovery.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    37/228

    25

    Instruction Used to:

    1

    Wait for work object on conveyor1 Drop work object on conveyor

    Sensor Synchronization, is the function whereby the robot speed follows a sensorwhich can be mounted on a moving conveyor or a press motor axis .

    Instruction Used to:

    2 Connect to an object in the start window on a sensormechanical unit.

    Start or stop synchronization of robot movement to sensormovement.

    Disconnect from the current object.

    Instruction Used to:

    3 Deactivates/activates motion supervision

    Valid robot position for parameter identification

    Valid robot type for parameter identification

    Load identification of tool or payload

    Load identification of external manipulator

    Data type Used to:

    Represent an integer with a symbolic constant

    Represent an integer with a symbolic constant Represent an integer with a symbolic constant

    1. Only if the robot is equipped with the option Conveyor tracking.2. Only if the robot is equipped with the option Sensor synchronization.3. Only if the robot is equipped with the option Collision detection.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    38/228

    26

    Function Used to:

    Add an offset to a robot position, expressed in relation to thework object

    Add an offset, expressed in the tool coordinate system

    Calculates from

    Read the current position (only,,of the robot)

    Read the current position (the complete )

    Read the current joint angles

    Read the current motor angles

    Read the current tooldata value Read the current wobjdata value

    Remove a program displacement from a position

    Mirror a position

    Calculates joint angles from

    The distance between two positions

    Function Used to:

    1 Check if the path has been interrupted at power failure.

    Function Used to:

    Read the speed override set by the operator from the Programor Production Window.

    1. Only if the robot is equipped with the option Advanced RAPID.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    39/228

    27

    Motion data is used as an argument in the positioning instructions.

    Data type Used to define: The end position

    The end position for aor instruction

    The speed

    The accuracy of the position (stop point or fly-by point)

    The tool coordinate system and the load of the tool

    The work object coordinate system

    The termination of the position

    A number used to control synchronizing of two or morecoordinated synchronized movement with each other

    Data type Used to define:

    A position (x, y, z)

    An orientation

    A coordinate system (position + orientation) The configuration of the robot axes

    The position of the external axes

    The position of the robot axes

    A load

    An external mechanical unit

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    40/228

    28

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    41/228

    29

    The robot can be equipped with a number of digital and analog user signals that can be

    read and changed from within the program.

    The signal names are defined in the system parameters. These names are alwaysavailable in the program for reading or setting I/O operations.

    The value of an analog signal or a group of digital signals is specified as a numericvalue.

    Instruction Used to:

    Invert the value of a digital output signal

    Generate a pulse on a digital output signal

    Reset a digital output signal (to 0)

    Set a digital output signal (to 1)

    Change the value of an analog output signal Change the value of a digital output signal (symbolic value;

    e.g. )

    Change the value of a group of digital output signals

    The value of an input signal can be read directly in the program, e.g. :

    ! Digital inputIF di1 = 1 THEN ...

    ! Digital group inputIF gi1 = 5 THEN ...

    ! Analog inputIF ai1 > 5.2 THEN ...

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    42/228

    30

    Following recoverable error can be generated. The error can be handled in an error han-dler. The system variable ERRNO will be set to:

    ERR_NORUNUNIT if there is no contact with the unit

    Function Used to:

    Read the current value of an analog output signal

    Read the current value of a digital output signal

    Read the current value of a group of digital output signals

    Instruction Used to:

    Wait until a digital input is set or reset

    Wait until a digital output is set on reset

    Function Used to:

    Test whether a digital input is set

    I/O modules are automatically enabled at start-up, but they can be disabled duringprogram execution and re-enabled later.

    Instruction Used to:

    Disable an I/O module

    Enable an I/O module

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    43/228

    31

    Data type Used to define:

    The symbolic value of a digital signal The name of an analog input signal *

    The name of an analog output signal *

    The name of a digital input signal *

    The name of a digital output signal *

    The name of a group of digital input signals *

    The name of a group of digital output signals *

    Instruction Used to:

    1 Define a signal with an alias name

    Data type Used to define:

    iounit_state The status of the I/O unit

    bustate The status of the I/O busFunction Used to:

    s Returns current status of the I/O unit.

    Returns current status of the I/O bus.

    1. Only if the robot is equipped with the optionAdvanced RAPID-Alias I/O signals.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    44/228

    32

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    45/228

    33

    There are four possible ways to communicate via serial channels:

    - Messages can be output to the FlexPendant display and the user can answerquestions, such as about the number of parts to be processed.

    - Character-based information can be written to or read from text files in massmemory. In this way, for example, production statistics can be stored andprocessed later in a PC. Information can also be printed directly on a printerconnected to the robot.

    - Binary information can be transferred between the robot and a sensor, forexample.

    - Binary information can be transferred between the robot and another computer,

    for example, with a link protocol.

    The decision whether to use character-based or binary information depends on how theequipment with which the robot communicates handles that information. A file, forexample, can have data that is stored in character-based or binary form.

    If communication is required in both directions simultaneously, binary transmission isnecessary.

    Each serial channel or file used must first be opened. On doing this, the channel/filereceives a descriptor that is then used as a reference when reading/writing. TheFlexPendant can be used at all times and does not need to be opened.

    Both text and the value of certain types of data can be printed.

    Instruction Used to:

    Clear the FlexPendant operator display

    Write text on the FlexPendant operator display

    Write text on the FlexPendant display and simultaneouslystore that message in the progams error log.

    Label the function keys and to read which key is pressed

    Read a numeric value from the FlexPendant

    Choose a window on the FlexPendant from RAPID

    Data type Used to:

    Represent FlexPendant window with a symbolic constant

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    46/228

    34

    Instruction Used to:

    Write message to FlexPendantRead pressed button from FlexPendantType basic

    Function Used to:

    Write message to FlexPendantRead pressed button from FlexPendantType advanced

    Read a numeric value from the FlexPendant

    Tune a numeric value from the FlexPendant

    Read text from the FlexPendant Select item in a list from the FlexPendant

    Is the FlexPendant connected to the system

    Data type Used to:

    Represent icon with a symbolic constant

    Represent button with a symbolic constant

    Define menu list items

    Represent selected button with a symbolic constant

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    47/228

    35

    Instruction Used to:

    1

    Open a channel/file for reading or writing1 Write text to the channel/file

    1 Close the channel/file

    Function Used to:

    1 Read a numeric value

    1 Read a text string

    Instruction Used to:

    1 Open a serial channel/file for binary transfer of data

    1 Write to a binary serial channel/file

    1 Write to any binary serial channel/file

    1 Write a string to a binary serial channel/file

    1 Set the file position to the beginning of the file

    1 Close the channel/file

    1 Clear input buffer of a serial channel

    1 Read from any binary serial channel

    Write data of type rawbytes to a binary serial channel/file/fieldbus

    Read data of type rawbytes from a binary serial channel/file/field bus

    Function Used to:

    1 Read from a binary serial channel

    1 Read a string from a binary serial channel/file

    1. Only if the robot is equipped with the option File and serial channel handling

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    48/228

    36

    Instruction Used to:

    Set a rawbytes variable to zero

    Copy from one rawbytes variable to another

    1 Pack the contents of a variable into a container of typerawbytes

    Unpack the contents of a container of type rawbytes to avariable

    Pack the header of a DeviceNet message into a container ofrawbytes

    Function Used to

    1 Get the current length of valid bytes in a rawbyte variable

    Data type Used to define:

    1 A reference to a serial channel/file, which can then be used for

    reading and writing A general data container, used for communication with I/O

    devices

    Instruction Used to:

    3 Write to a predefined variable.

    Read a predefined block. Write to a predefined block.

    Function Used to:

    Read a predefined variable.

    1. Only if the robot is equipped with the option File and serial channel handling.2. Only if the robot is equipped with the option Fieldbus command interface.3. Only if the robot is equipped with the option Extended functionality

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    49/228

    37

    Instruction Used to:

    1

    Create a new socket1 Connect to remote computer (only client applications)

    1 Send data to remote computer

    1 Receive data from remote computer

    1 Close the socket

    1 Bind a socket to a port (only server applications)

    1 Listen for connections (only server applications)

    1 Accept connections (only server applications)

    Function Used to:

    Get current socket state

    Data type Used to define:

    1 Socket device

    1 Socket status

    1. Only if the robot is equipped with the optionSocket Messaging

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    50/228

    38

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    51/228

    39

    Interrupts are used by the program to enable it to deal directly with an event, regardless

    of which instruction is being run at the time.The program is interrupted, for example, when a specific input is set to one. When thisoccurs, the ordinary program is interrupted and a special trap routine is executed.When this has been fully executed, program execution resumes from where it wasinterrupted.

    Each interrupt is assigned an interrupt identity. It obtains its identity by creating a

    variable (of data type ) and connecting this to a trap routine.

    The interrupt identity (variable) is then used to order an interrupt, i.e. to specify thereason for the interrupt. This may be one of the following events:

    - An input or output is set to one or to zero.

    - A given amount of time elapses after an interrupt is ordered.

    - A specific position is reached.

    When an interrupt is ordered, it is also automatically enabled, but can be temporarilydisabled. This can take place in two ways:

    - All interrupts can be disabled. Any interrupts occurring during this time areplaced in a queue and then automatically generated when interrupts are enabledagain.

    - Individual interrupts can be deactivated. Any interrupts occurring during thistime are disregarded.

    Instruction Used to:CONNECT Connect a variable (interrupt identity) to a trap routine

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    52/228

    40

    Instruction Used to order:

    An interrupt from a digital input signal Aninterrupt from a digital output signal

    An interrupt from a group of digital input signals

    An interrupt from a group of digital output signals

    1 An interrupt from an analog input signal

    Aninterrupt from an analog output signal

    A timed interrupt

    2 A position-fixed interrupt (from the Motion pick list )

    An interrupt when changing a persistent. Order and enable an interrupt when an error occurs

    Instruction Used to:

    Cancel (delete) an interrupt

    Instruction Used to:

    Deactivate an individual interrupt

    Activate an individual interrupt

    Disable all interrupts

    Enable all interrupts

    Instruction Is Used:

    in a trap routine to obtain all information about the interruptthat caused the trap routine to be executed.

    3 in a trap routine, to obtain numeric information (domain, typeand number) about an error, a state change, or a warning, thatcaused the trap routine to be executed.

    1. Only if the robot is equipped with the option Analog signal interrupt.2. Only if the robot is equipped with the option Fixed position events.3. Only if the robot is equipped with the option Advanced RAPID.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    53/228

    41

    Data type Used to:

    Definethe identity of an interrupt. Contain the interrupt data that caused the current TRAP

    routine to be executed.

    Specify an error type (gravity).

    Specify an error domain.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    54/228

    42

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    55/228

    43

    Many of the errors that occur when a program is being executed can be handled in the

    program, which means that program execution does not have to be interrupted. Theseerrors are either of a type detected by the system, such as division by zero, or of a typethat is raised by the program, such as a program raising an error when an incorrectvalue is read by a bar code reader.

    When an error occurs, the error handler of the routine is called (if there is one). It isalso possible to create an error from within the program and then jump to the errorhandler.

    In an error handler, errors can be handled using ordinary instructions. The system datacan be used to determine the type of error that has occurred. A return from theerror handler can then take place in various ways (RETURN, RETRY, TRYNEXT, andRAISE).

    If the current routine does not have an error handler, the internal error handler of therobot takes over directly. The internal error handler gives an error message and stopsprogram execution with the program pointer at the faulty instruction.

    Instruction Used to:

    Create an error and call the error handler

    Instruction Used to:

    1 Book a new RAPID system error number.

    1. Only when the robot is equipped with the option Advanced RAPID.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    56/228

    44

    Instruction Used to:

    Stop program execution in the event of a fatal error Call the error handler of the routine that called the current

    routine

    Re-execute the instruction that caused the error

    Execute the instruction following the instruction that causedthe error

    Return to the routine that called the current routine

    From a NOSTEPIN routine, the error is raised to the errorhandler at user level.

    An instruction that replaces the two instructions and. It both resumes movements and re-execute theinstruction that caused the error.

    Skip the latest requested warning message.

    Instruction Used to:

    Display an error message on the teach pendant and write it inthe robot message log.

    Create an error in the program and then call the error handler ofthe routine.

    Instruction Used to:

    1 Generate process error during robot movement.

    Data type Used to define:

    The reason for the error

    Text in an error message

    System parameter Used to define:

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    57/228

    45

    The number of times a failing instruction will be retried if theerror handler use. belongs to the type in the topic .

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    58/228

    46

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    59/228

    47

    System and time instructions allow the user to measure, inspect and record time.

    Clock instructions allow the user to use clocks that function as stopwatches. In this waythe robot program can be used to time any desired event.

    The current time or date can be retrieved in a string. This string can then be displayedto the operator on the FlexPendant display or used to time and date-stamp log files.

    It is also possible to retrieve components of the current system time as a numeric value.

    This allows the robot program to perform an action at a certain time or on a certain dayof the week.

    Instruction Used to:

    Reset a clock used for timing

    Start a clock used for timing

    Stop a clock used for timingFunction Used to:

    Read a clock used for timing

    Data Type Used for:

    Timing stores a time measurement in seconds

    Function Used to:

    Read the Current Date as a string

    Read the Current Time as a string

    Read the Current Time as a numeric value

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    60/228

    48

    Function Used to:

    Retrieve the last time for modification of a file. Retrieve the time of loading a specified module.

    Function Used to:

    Retrieve the size of free program memory.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    61/228

    49

    Mathematical instructions and functions are used to calculate and change the value of

    data.

    Calculations are normally performed using the assignment instruction, e.g. . There are also some instructions used for simple calculations,such as to clear a numeric variable.

    Instruction Used to:

    Clear the value

    Add or subtract a value

    Increment by 1

    Decrement by 1

    Instruction Used to:

    Perform calculations on any type of data

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    62/228

    50

    Function Used to:

    Calculate the absolute value Round a numeric value

    Truncate a numeric value

    Calculate the square root

    Calculate the exponential value with the base e

    Calculate the exponential value with an arbitrary base

    Calculate the arc cosine value

    Calculate the arc sine value

    Calculate the arc tangent value in the range [-90,90] Calculate the arc tangent value in the range [-180,180]

    Calculate the cosine value

    Calculate the sine value

    Calculate the tangent value

    Calculate Euler angles from an orientation

    Calculate the orientation from Euler angles

    Invert a pose

    Multiply a pose Multiply a pose and a vector

    Calculate the magnitude of avector.

    Calculate the dot (or scalar) product of two pos vectors.

    Normalise unnormalised orientation (quarternion)

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    63/228

    51

    Instruction Used to:

    1

    Clear a specified bit in a defined data. Set a specified bit to 1 in a defined data.

    Function Used to:

    Check if a specified bit in a defined byte data is set to 1.

    Execute a logical bitwiseoperation on data types .

    Execute a logical bitwiseoperation on data types.

    Execute a logical bitwise operation on data types .

    Execute a logical bitwiseoperation on data types .

    Execute a logical bitwise operation on data types.

    Execute a logical bitwise operation on datatypes .

    Data type Used to:

    1 Used together with instructions and functions that handle bitmanipulation.

    1. Only when the robot is equipped with the option Advanced RAPID - Bit functions.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    64/228

    52

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    65/228

    53

    The robot can be controlled from a superordinate computer. In this case, a special

    communications protocol is used to transfer information.

    As a common communications protocol is used to transfer information from the robotto the computer and vice versa, the robot and computer can understand each other andno programming is required. The computer can, for example, change values in theprograms data without any programming having to be carried out (except for definingthis data). Programming is only necessary when program-controlled information hasto be sent from the robot to the superordinate computer.

    Instruction Used to:

    1 Send a message to the superordinate computer

    1. Only if the robot is equipped with the option PC interface/backup.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    66/228

    54

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    67/228

    55

    Instruction Used to:

    MakeDir1 Create a new directory.RemoveDir1 Remove a directory.

    OpenDir1 Open a directory for further investigation.

    CloseDir1 Close a directory in balance with .

    RemoveFile1 Remove a file.

    RenameFile1 Rename a file.

    CopyFile1 Copy a file.

    Function Used to:ISFile1 Check the type of a file.

    FSSize1 Retrive the size of a file system.

    FileSize1 Retrive the size of a specified file.

    ReadDir1 Read next entry in a directory.

    Data Type Used to:

    dir1 Traverse directory structures.

    1. Only if the robot is equipped with the option File and serial channel handling - File operation functions.

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    68/228

    56

  • 8/9/2019 IRC5-Rapid Overview 3HAC16580-1 RevB en Library

    69/228

    57

    Various functions for supporting of the RAPID language:

    - Get system data