Document Name
stringclasses 11
values | URL
stringclasses 11
values | page_number
int64 1
1.26k
| full_text
stringlengths 65
18.2k
|
|---|---|---|---|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 5
|
Table of Contents
3
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1 Instructions
15
1.1 AccSet - Reduces the acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2 ActUnit - Activates a mechanical unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3 Add - Adds a numeric value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 AliasIO - Define I/O signal with alias name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.5 ":=" - Assigns a value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.6 BitClear - Clear a specified bit in a byte data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.7 BitSet - Set a specified bit in a byte data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.8 BookErrNo - Book a RAPID system error number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.9 Break - Break program execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.10 CallByVar - Call a procedure by a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.11 CancelLoad - Cancel loading of a module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.12 CheckProgRef - Check program references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.13 CirPathMode - Tool reorientation during circle path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.14 Clear - Clears the value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.15 ClearIOBuff - Clear input buffer of a serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.16 ClearPath - Clear current path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.17 ClearRawBytes - Clear the contents of rawbytes data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
1.18 ClkReset - Resets a clock used for timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
1.19 ClkStart - Starts a clock used for timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
1.20 ClkStop - Stops a clock used for timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.21 Close - Closes a file or serial channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
1.22 CloseDir - Close a directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
1.23 Comment - Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
1.24 Compact IF - If a condition is met, then... (one instruction) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
1.25 ConfJ - Controls the configuration during joint movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
1.26 ConfL - Monitors the configuration during linear movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
1.27 CONNECT - Connects an interrupt to a trap routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
1.28 CopyFile - Copy a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
1.29 CopyRawBytes - Copy the contents of rawbytes data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
1.30 CorrClear - Removes all correction generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
1.31 CorrCon - Connects to a correction generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1.32 CorrDiscon - Disconnects from a correction generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.33 CorrWrite - Writes to a correction generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
1.34 DeactUnit - Deactivates a mechanical unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.35 Decr - Decrements by 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
1.36 DitherAct - Enables dither for soft servo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
1.37 DitherDeact - Disables dither for soft servo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
1.38 DropWObj - Drop work object on conveyor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
1.39 EOffsOff - Deactivates an offset for external axes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.40 EOffsOn - Activates an offset for external axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.41 EOffsSet - Activates an offset for external axes using known values . . . . . . . . . . . . . . . . . . . . . . . . . . 90
1.42 EraseModule - Erase a module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
1.43 ErrLog - Write an error message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
1.44 ErrRaise - Writes a warning and calls an error handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
1.45 ErrWrite - Write an error message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
1.46 EXIT - Terminates program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
1.47 ExitCycle - Break current cycle and start next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
1.48 FOR - Repeats a given number of times. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
1.49 GetDataVal - Get the value of a data object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
1.50 GetSysData - Get system data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
1.51 GetTrapData - Get interrupt data for current TRAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
1.52 GOTO - Goes to a new instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 6
|
Table of Contents
4
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.53 GripLoad - Defines the payload for the robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.54 HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403. . . . . . . . . . . . . . . . . . . . . . . . . . 121
1.55 IDelete - Cancels an interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
1.56 IDisable - Disables interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
1.57 IEnable - Enables interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
1.58 IError - Orders an interrupt on errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
1.59 IF - If a condition is met, then ...; otherwise ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
1.60 Incr - Increments by 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
1.61 IndAMove - Independent absolute position movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
1.62 IndCMove - Independent continuous movement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
1.63 IndDMove - Independent delta position movement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
1.64 IndReset - Independent reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
1.65 IndRMove - Independent relative position movement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
1.66 InvertDO - Inverts the value of a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
1.67 IOBusStart - Start of I/O bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
1.68 IOBusState - Get current state of I/O bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
1.69 IODisable - Disable I/O unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
1.70 IOEnable - Enable I/O unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
1.71 IPers - Interrupt at value change of a persistent variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
1.72 IRMQMessage - Orders RMQ interrupts for a data type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
1.73 ISignalAI - Interrupts from analog input signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
1.74 ISignalAO - Interrupts from analog output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
1.75 ISignalDI - Orders interrupts from a digital input signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
1.76 ISignalDO - Interrupts from a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
1.77 ISignalGI - Orders interrupts from a group of digital input signals. . . . . . . . . . . . . . . . . . . . . . . . . . . 192
1.78 ISignalGO - Orders interrupts from a group of digital output signals . . . . . . . . . . . . . . . . . . . . . . . . . 195
1.79 ISleep - Deactivates an interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
1.80 ITimer - Orders a timed interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
1.81 IVarValue - orders a variable value interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
1.82 IWatch - Activates an interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
1.83 Label - Line name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
1.84 Load - Load a program module during execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
1.85 LoadId - Load identification of tool or payload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
1.86 MakeDir - Create a new directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
1.87 ManLoadIdProc - Load identification of IRBP manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
1.88 MechUnitLoad - Defines a payload for a mechanical unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
1.89 MotionSup - Deactivates/Activates motion supervision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
1.90 MoveAbsJ - Moves the robot to an absolute joint position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
1.91 MoveC - Moves the robot circularly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
1.92 MoveCDO - Moves the robot circularly and sets digital output in the corner. . . . . . . . . . . . . . . . . . . 242
1.93 MoveCSync - Moves the robot circularly and executes a RAPID procedure . . . . . . . . . . . . . . . . . . . 246
1.94 MoveExtJ - Move one or several mechanical units without TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
1.95 MoveJ - Moves the robot by joint movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
1.96 MoveJDO - Moves the robot by joint movement and sets digital output in the corner. . . . . . . . . . . . 257
1.97 MoveJSync - Moves the robot by joint movement and executes a RAPID procedure . . . . . . . . . . . . 260
1.98 MoveL - Moves the robot linearly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
1.99 MoveLDO - Moves the robot linearly and sets digital output in the corner . . . . . . . . . . . . . . . . . . . . 268
1.100 MoveLSync - Moves the robot linearly and executes a RAPID procedure. . . . . . . . . . . . . . . . . . . . 271
1.101 MToolRotCalib - Calibration of rotation for moving tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
1.102 MToolTCPCalib - Calibration of TCP for moving tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
1.103 Open - Opens a file or serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
1.104 OpenDir - Open a directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
1.105 PackDNHeader - Pack DeviceNet Header into rawbytes data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
1.106 PackRawBytes - Pack data into rawbytes data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
1.107 PathAccLim - Reduce TCP acceleration along the path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 7
|
Table of Contents
5
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.108 PathRecMoveBwd - Move path recorder backwards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
1.109 PathRecMoveFwd - Move path recorder forward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
1.110 PathRecStart - Start the path recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
1.111 PathRecStop - Stop the path recorder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
1.112 PathResol - Override path resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
1.113 PDispOff - Deactivates program displacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
1.114 PDispOn - Activates program displacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
1.115 PDispSet - Activates program displacement using known frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
1.116 ProcCall - Calls a new procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
1.117 ProcerrRecovery - Generate and recover from process-move error. . . . . . . . . . . . . . . . . . . . . . . . . . 325
1.118 PulseDO - Generates a pulse on a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
1.119 RAISE - Calls an error handler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
1.120 RaiseToUser - Propagates an error to user level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
1.121 ReadAnyBin - Read data from a binary serial channel or file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
1.122 ReadBlock - read a block of data from device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
1.123 ReadCfgData - Reads attribute of a system parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
1.124 ReadErrData - Gets information about an error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
1.125 ReadRawBytes - Read rawbytes data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
1.126 RemoveDir - Delete a directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
1.127 RemoveFile - Delete a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
1.128 RenameFile - Rename a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
1.129 Reset - Resets a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
1.130 ResetPPMoved - Reset state for the program pointer moved in manual mode . . . . . . . . . . . . . . . . . 360
1.131 ResetRetryCount - Reset the number of retries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
1.132 RestoPath - Restores the path after an interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
1.133 RETRY - Resume execution after an error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
1.134 RETURN - Finishes execution of a routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
1.135 Rewind - Rewind file position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
1.136 RMQEmptyQueue - Empty RAPID Message Queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
1.137 RMQFindSlot - Find a slot identity from the slot name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
1.138 RMQGetMessage - Get an RMQ message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
1.139 RMQGetMsgData - Get the data part from an RMQ message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
1.140 RMQGetMsgHeader - Get header information from an RMQ message . . . . . . . . . . . . . . . . . . . . . . 380
1.141 RMQReadWait - Returns message from RMQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
1.142 RMQSendMessage - Send an RMQ data message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
1.143 RMQSendWait - Send an RMQ data message and wait for a response. . . . . . . . . . . . . . . . . . . . . . . 390
1.144 Save - Save a program module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
1.145 SCWrite - Send variable data to a client application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
1.146 SearchC - Searches circularly using the robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
1.147 SearchExtJ - Search with one or several mechanical units without TCP. . . . . . . . . . . . . . . . . . . . . . 410
1.148 SearchL - Searches linearly using the robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
1.149 SenDevice - connect to a sensor device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
1.150 Set - Sets a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
1.151 SetAllDataVal - Set a value to all data objects in a defined set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
1.152 SetAO - Changes the value of an analog output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
1.153 SetDataSearch - Define the symbol set in a search sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
1.154 SetDataVal - Set the value of a data object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
1.155 SetDO - Changes the value of a digital output signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
1.156 SetGO - Changes the value of a group of digital output signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
1.157 SetSysData - Set system data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
1.158 SingArea - Defines interpolation around singular points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
1.159 SkipWarn - Skip the latest warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
1.160 SocketAccept - Accept an incoming connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
1.161 SocketBind - Bind a socket to my IP-address and port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
1.162 SocketClose - Close a socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 8
|
Table of Contents
6
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.163 SocketConnect - Connect to a remote computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
1.164 SocketCreate - Create a new socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
1.165 SocketListen - Listen for incoming connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
1.166 SocketReceive - Receive data from remote computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
1.167 SocketSend - Send data to remote computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
1.168 SoftAct - Activating the soft servo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
1.169 SoftDeact - Deactivating the soft servo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
1.170 SpeedRefresh - Update speed override for ongoing movement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
1.171 SpyStart - Start recording of execution time data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
1.172 SpyStop - Stop recording of time execution data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
1.173 StartLoad - Load a program module during execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
1.174 StartMove - Restarts robot movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
1.175 StartMoveRetry - Restarts robot movement and execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
1.176 STCalib - Calibrate a Servo Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
1.177 STClose - Close a Servo Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
1.178 StepBwdPath - Move backwards one step on path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
1.179 STIndGun - Sets the gun in independent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
1.180 STIndGunReset - Resets the gun from independent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
1.181 SToolRotCalib - Calibration of TCP and rotation for stationary tool . . . . . . . . . . . . . . . . . . . . . . . . 504
1.182 SToolTCPCalib - Calibration of TCP for stationary tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
1.183 Stop - Stops program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
1.184 STOpen - Open a Servo Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
1.185 StopMove - Stops robot movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
1.186 StopMoveReset - Reset the system stop move state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
1.187 StorePath - Stores the path when an interrupt occurs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
1.188 STTune - Tuning Servo Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
1.189 STTuneReset - Resetting Servo tool tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
1.190 SyncMoveOff - End coordinated synchronized movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
1.191 SyncMoveOn - Start coordinated synchronized movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
1.192 SyncMoveResume - Set synchronized coordinated movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
1.193 SyncMoveSuspend - Set independent-semicoordinated movements. . . . . . . . . . . . . . . . . . . . . . . . . 543
1.194 SyncMoveUndo - Set independent movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
1.195 SystemStopAction - Stop the robot system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
1.196 TEST - Depending on the value of an expression ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
1.197 TestSignDefine - Define test signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
1.198 TestSignReset - Reset all test signal definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
1.199 TextTabInstall - Installing a text table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
1.200 TPErase - Erases text printed on the FlexPendant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
1.201 TPReadDnum - Reads a number from the FlexPendant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
1.202 TPReadFK - Reads function keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
1.203 TPReadNum - Reads a number from the FlexPendant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
1.204 TPShow - Switch window on the FlexPendant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
1.205 TPWrite - Writes on the FlexPendant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
1.206 TriggC - Circular robot movement with events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
1.207 TriggCheckIO - Defines IO check at a fixed position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
1.208 TriggEquip - Define a fixed position and time I/O event on the path . . . . . . . . . . . . . . . . . . . . . . . . 582
1.209 TriggInt - Defines a position related interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
1.210 TriggIO - Define a fixed position or time I/O event near a stop point. . . . . . . . . . . . . . . . . . . . . . . . 592
1.211 TriggJ - Axis-wise robot movements with events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
1.212 TriggL - Linear robot movements with events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
1.213 TriggLIOs - Linear robot movements with I/O events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
1.214 TriggRampAO - Define a fixed position ramp AO event on the path . . . . . . . . . . . . . . . . . . . . . . . . 616
1.215 TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event. 622
1.216 TriggStopProc - Generate restart data for trigg signals at stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
1.217 TryInt - Test if data object is a valid integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 9
|
Table of Contents
7
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.218 TRYNEXT - Jumps over an instruction which has caused an error . . . . . . . . . . . . . . . . . . . . . . . . . 636
1.219 TuneReset - Resetting servo tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
1.220 TuneServo - Tuning servos. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
1.221 UIMsgBox - User Message Dialog Box type basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
1.222 UIShow - User Interface show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
1.223 UnLoad - UnLoad a program module during execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
1.224 UnpackRawBytes - Unpack data from rawbytes data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
1.225 VelSet - Changes the programmed velocity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
1.226 WaitAI - Waits until an analog input signal value is set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
1.227 WaitAO - Waits until an analog output signal value is set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
1.228 WaitDI - Waits until a digital input signal is set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
1.229 WaitDO - Waits until a digital output signal is set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
1.230 WaitGI - Waits until a group of digital input signals are set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
1.231 WaitGO - Waits until a group of digital output signals are set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
1.232 WaitLoad - Connect the loaded module to the task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
1.233 WaitRob - Wait until stop point or zero speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
1.234 WaitSyncTask - Wait at synchronization point for other program tasks . . . . . . . . . . . . . . . . . . . . . . 688
1.235 WaitTestAndSet - Wait until variable unset - then set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
1.236 WaitTime - Waits a given amount of time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
1.237 WaitUntil - Waits until a condition is met . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
1.238 WaitWObj - Wait for work object on conveyor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
1.239 WarmStart - Restart the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
1.240 WHILE - Repeats as long as .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
1.241 WorldAccLim - Control acceleration in world coordinate system. . . . . . . . . . . . . . . . . . . . . . . . . . . 707
1.242 Write - Writes to a character-based file or serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
1.243 WriteAnyBin - Writes data to a binary serial channel or file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
1.244 WriteBin - Writes to a binary serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
1.245 WriteBlock - write block of data to device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
1.246 WriteCfgData - Writes attribute of a system parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
1.247 WriteRawBytes - Write rawbytes data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
1.248 WriteStrBin - Writes a string to a binary serial channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
1.249 WriteVar - write variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
1.250 WZBoxDef - Define a box-shaped world zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
1.251 WZCylDef - Define a cylinder-shaped world zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
1.252 WZDisable - Deactivate temporary world zone supervision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
1.253 WZDOSet - Activate world zone to set digital output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
1.254 WZEnable - Activate temporary world zone supervision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742
1.255 WZFree - Erase temporary world zone supervision. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
1.256 WZHomeJointDef - Define a world zone for home joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
1.257 WZLimJointDef - Define a world zone for limitation in joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
1.258 WZLimSup - Activate world zone limit supervision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753
1.259 WZSphDef - Define a sphere-shaped world zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756
2 Functions
759
2.1 Abs - Gets the absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
2.2 ACos - Calculates the arc cosine value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
2.3 AOutput - Reads the value of an analog output signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
2.4 ArgName - Gets argument name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
2.5 ASin - Calculates the arc sine value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
2.6 ATan - Calculates the arc tangent value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
2.7 ATan2 - Calculates the arc tangent2 value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
2.8 BitAnd - Logical bitwise AND - operation on byte data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
2.9 BitCheck - Check if a specified bit in a byte data is set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
2.10 BitLSh - Logical bitwise LEFT SHIFT - operation on byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774
2.11 BitNeg - Logical bitwise NEGATION - operation on byte data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 10
|
Table of Contents
8
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
2.12 BitOr - Logical bitwise OR - operation on byte data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
2.13 BitRSh - Logical bitwise RIGHT SHIFT - operation on byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780
2.14 BitXOr - Logical bitwise XOR - operation on byte data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
2.15 ByteToStr - Converts a byte to a string data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
2.16 CalcJointT - Calculates joint angles from robtarget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
2.17 CalcRobT - Calculates robtarget from jointtarget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
2.18 CalcRotAxFrameZ - Calculate a rotational axis frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
2.19 CalcRotAxisFrame - Calculate a rotational axis frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
2.20 CDate - Reads the current date as a string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
2.21 CJointT - Reads the current joint angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
2.22 ClkRead - Reads a clock used for timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
2.23 CorrRead - Reads the current total offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
2.24 Cos - Calculates the cosine value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804
2.25 CPos - Reads the current position (pos) data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
2.26 CRobT - Reads the current position (robtarget) data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
2.27 CSpeedOverride - Reads the current override speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
2.28 CTime - Reads the current time as a string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
2.29 CTool - Reads the current tool data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
2.30 CWObj - Reads the current work object data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
2.31 DecToHex - Convert from decimal to hexadecimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
2.32 DefAccFrame - Define an accurate frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
2.33 DefDFrame - Define a displacement frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
2.34 DefFrame - Define a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
2.35 Dim - Obtains the size of an array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
2.36 Distance - Distance between two points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
2.37 DnumToNum - Converts dnum to num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
2.38 DotProd - Dot product of two pos vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
2.39 DOutput - Reads the value of a digital output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
2.40 EulerZYX - Gets euler angles from orient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
2.41 EventType - Get current event type inside any event routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
2.42 ExecHandler - Get type of execution handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
2.43 ExecLevel - Get execution level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840
2.44 Exp - Calculates the exponential value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
2.45 FileSize - Retrieve the size of a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
2.46 FileTime - Retrieve time information about a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
2.47 FSSize - Retrieve the size of a file system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
2.48 GetMecUnitName - Get the name of the mechanical unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
2.49 GetNextMechUnit - Get name and data for mechanical units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852
2.50 GetNextSym - Get next matching symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
2.51 GetSysInfo - Get information about the system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
2.52 GetTaskName - Gets the name and number of current task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860
2.53 GetTime - Reads the current time as a numeric value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
2.54 GInputDnum - Read value of group input signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864
2.55 GOutput - Reads the value of a group of digital output signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
2.56 GOutputDnum - Read value of group output signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
2.57 HexToDec - Convert from hexadecimal to decimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870
2.58 IndInpos - Independent axis in position status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
2.59 IndSpeed - Independent speed status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873
2.60 IOUnitState - Get current state of I/O unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
2.61 IsFile - Check the type of a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
2.62 IsMechUnitActive - Is mechanical unit active. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
2.63 IsPers - Is persistent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
2.64 IsStopMoveAct - Is stop move flags active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
2.65 IsStopStateEvent - Test whether moved program pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
2.66 IsSyncMoveOn - Test if in synchronized movement mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 11
|
Table of Contents
9
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
2.67 IsSysId - Test system identity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
2.68 IsVar - Is variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891
2.69 MaxRobSpeed - Maximum robot speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
2.70 MirPos - Mirroring of a position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
2.71 ModExist - Check if program module exist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
2.72 ModTime - Get file modify time for the loaded module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
2.73 MotionPlannerNo - Get connected motion planner number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
2.74 NonMotionMode - Read the Non-Motion execution mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
2.75 NOrient - Normalize orientation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901
2.76 NumToDnum - Converts num to dnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
2.77 NumToStr - Converts numeric value to string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904
2.78 Offs - Displaces a robot position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
2.79 OpMode - Read the operating mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
2.80 OrientZYX - Builds an orient from euler angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
2.81 ORobT - Removes the program displacement from a position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
2.82 ParIdPosValid - Valid robot position for parameter identification . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
2.83 ParIdRobValid - Valid robot type for parameter identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916
2.84 PathLevel - Get current path level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
2.85 PathRecValidBwd - Is there a valid backward path recorded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
2.86 PathRecValidFwd - Is there a valid forward path recorded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924
2.87 PFRestart - Check interrupted path after power failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
2.88 PoseInv - Inverts pose data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929
2.89 PoseMult - Multiplies pose data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931
2.90 PoseVect - Applies a transformation to a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
2.91 Pow - Calculates the power of a value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935
2.92 PPMovedInManMode - Test whether the program pointer is moved in manual mode . . . . . . . . . . . . 936
2.93 Present - Tests if an optional parameter is used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 937
2.94 ProgMemFree - Get the size of free program memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
2.95 RawBytesLen - Get the length of rawbytes data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
2.96 ReadBin - Reads a byte from a file or serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942
2.97 ReadDir - Read next entry in a directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944
2.98 ReadMotor - Reads the current motor angles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
2.99 ReadNum - Reads a number from a file or serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
2.100 ReadStr - Reads a string from a file or serial channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952
2.101 ReadStrBin - Reads a string from a binary serial channel or file. . . . . . . . . . . . . . . . . . . . . . . . . . . . 956
2.102 ReadVar - Read variable from a device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 958
2.103 RelTool - Make a displacement relative to the tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
2.104 RemainingRetries - Remaining retries left to do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
2.105 RMQGetSlotName - Get the name of an RMQ client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964
2.106 RobName - Get the TCP robot name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966
2.107 RobOS - Check if execution is on RC or VC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 968
2.108 Round - Round is a numeric value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969
2.109 RunMode - Read the running mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
2.110 Sin - Calculates the sine value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972
2.111 SocketGetStatus - Get current socket state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973
2.112 Sqrt - Calculates the square root value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
2.113 STCalcForce - Calculate the tip force for a Servo Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
2.114 STCalcTorque - Calc. the motor torque for a servo tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979
2.115 STIsCalib - Tests if a servo tool is calibrated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
2.116 STIsClosed - Tests if a servo tool is closed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983
2.117 STIsIndGun - Tests if a servo tool is in independent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
2.118 STIsOpen - Tests if a servo tool is open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
2.119 StrDigCalc - Arithmetic operations with datatype stringdig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988
2.120 StrDigCmp - Compare two strings with only digits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
2.121 StrFind - Searches for a character in a string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 14
|
Table of Contents
12
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
3.78 zonedata - Zone data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1232
4 Programming type examples
1239
4.1 ERROR handler with movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1239
4.2 Service routines with or without movements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1242
4.3 System I/O interrupts with or without movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1246
4.4 TRAP routines with movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1250
Index
1255
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 15
|
Table of Contents
12
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
3.78 zonedata - Zone data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1232
4 Programming type examples
1239
4.1 ERROR handler with movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1239
4.2 Service routines with or without movements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1242
4.3 System I/O interrupts with or without movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1246
4.4 TRAP routines with movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1250
Index
1255
Overview
13
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Overview
About this manual
This is a technical reference manual intended for the RAPID programmer. The RAPID base
instructions, functions and data types are detailed in this manual.
Usage
This manual should be read during programming and when you need specific information
about a RAPID instruction, function or data type.
Who should read this manual?
This manual is intended for someone with some previous experience in programming, for
example, a robot programmer.
Prerequisites
The reader should have some programming experience and have studied
•
Operating manual - Introduction to RAPID
•
Technical reference manual - RAPID overview
Organization of chapters
The manual is organized in the following chapters:
References
Chapter
Contents
1. Instructions
Detailed descriptions of all RAPID base
instructions, including examples of how to use
them.
2. Functions
Detailed descriptions of all RAPID base
functions, including examples of how to use
them.
3. Data types
Detailed descriptions of all RAPID base data
types, including examples of how to use them.
4. Programming type examples
A general view of how to write program code
that contains different instructions/functions/
data types. The chapter contains also
programming tips and explanations.
Reference
Document ID
Operating manual - Introduction to RAPID
3HAC029364-001
Technical reference manual - RAPID
overview
3HAC16580-1
Technical reference manual - RAPID kernel
3HAC16585-1
Continues on next page
Overview
3HAC 16581-1 Revision: J
14
© Copyright 2004-2010 ABB. All rights reserved.
Revisions
Revision
Description
F
7th edition. RobotWare 5.10.
New chapter added, 4 Programming type examples .
G
8th edition. RobotWare 5.11.
New instructions, functions and data types are added. Also a new
programming type example is added.
H
9th edition. RobotWare 5.12.
New instructions, functions and data types are added.
J
10th edition. RobotWare 5.13.
The following new instructions, functions and data types are added:
•
TPReadNum - Reads a number from the FlexPendant on page 564
•
Type - Get the data type name for a variable on page 1030
•
UIDnumEntry - User Number Entry on page 1038
•
UIDnumTune - User Number Tune on page 1044
•
triggiosdnum - Positioning events, trigg on page 1217
Updated safety signal graphics for the levels Danger and Warning .
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 16
|
Overview
13
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Overview
About this manual
This is a technical reference manual intended for the RAPID programmer. The RAPID base
instructions, functions and data types are detailed in this manual.
Usage
This manual should be read during programming and when you need specific information
about a RAPID instruction, function or data type.
Who should read this manual?
This manual is intended for someone with some previous experience in programming, for
example, a robot programmer.
Prerequisites
The reader should have some programming experience and have studied
•
Operating manual - Introduction to RAPID
•
Technical reference manual - RAPID overview
Organization of chapters
The manual is organized in the following chapters:
References
Chapter
Contents
1. Instructions
Detailed descriptions of all RAPID base
instructions, including examples of how to use
them.
2. Functions
Detailed descriptions of all RAPID base
functions, including examples of how to use
them.
3. Data types
Detailed descriptions of all RAPID base data
types, including examples of how to use them.
4. Programming type examples
A general view of how to write program code
that contains different instructions/functions/
data types. The chapter contains also
programming tips and explanations.
Reference
Document ID
Operating manual - Introduction to RAPID
3HAC029364-001
Technical reference manual - RAPID
overview
3HAC16580-1
Technical reference manual - RAPID kernel
3HAC16585-1
Continues on next page
Overview
3HAC 16581-1 Revision: J
14
© Copyright 2004-2010 ABB. All rights reserved.
Revisions
Revision
Description
F
7th edition. RobotWare 5.10.
New chapter added, 4 Programming type examples .
G
8th edition. RobotWare 5.11.
New instructions, functions and data types are added. Also a new
programming type example is added.
H
9th edition. RobotWare 5.12.
New instructions, functions and data types are added.
J
10th edition. RobotWare 5.13.
The following new instructions, functions and data types are added:
•
TPReadNum - Reads a number from the FlexPendant on page 564
•
Type - Get the data type name for a variable on page 1030
•
UIDnumEntry - User Number Entry on page 1038
•
UIDnumTune - User Number Tune on page 1044
•
triggiosdnum - Positioning events, trigg on page 1217
Updated safety signal graphics for the levels Danger and Warning .
Continued
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
15
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1 Instructions
1.1. AccSet - Reduces the acceleration
Usage
AccSet is used when handling fragile loads. It allows slower acceleration and deceleration,
which results in smoother robot movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction AccSet are illustrated below.
Example 1
AccSet 50, 100;
The acceleration is limited to 50% of the normal value.
Example 2
AccSet 100, 50;
The acceleration ramp is limited to 50% of the normal value.
Arguments
AccSet Acc Ramp
Acc
Data type: num
Acceleration and deceleration as a percentage of the normal values. 100% corresponds to
maximum acceleration. Maximum value: 100%. Input value < 20% gives 20% of maximum
acceleration.
Ramp
Data type: num
The rate at which acceleration and deceleration increases as a percentage of the normal
values. Jerking can be restricted by reducing this value. 100% corresponds to maximum rate.
Maximum value: 100%. Input value < 10% gives 10% of maximum rate.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 17
|
Overview
3HAC 16581-1 Revision: J
14
© Copyright 2004-2010 ABB. All rights reserved.
Revisions
Revision
Description
F
7th edition. RobotWare 5.10.
New chapter added, 4 Programming type examples .
G
8th edition. RobotWare 5.11.
New instructions, functions and data types are added. Also a new
programming type example is added.
H
9th edition. RobotWare 5.12.
New instructions, functions and data types are added.
J
10th edition. RobotWare 5.13.
The following new instructions, functions and data types are added:
•
TPReadNum - Reads a number from the FlexPendant on page 564
•
Type - Get the data type name for a variable on page 1030
•
UIDnumEntry - User Number Entry on page 1038
•
UIDnumTune - User Number Tune on page 1044
•
triggiosdnum - Positioning events, trigg on page 1217
Updated safety signal graphics for the levels Danger and Warning .
Continued
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
15
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1 Instructions
1.1. AccSet - Reduces the acceleration
Usage
AccSet is used when handling fragile loads. It allows slower acceleration and deceleration,
which results in smoother robot movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction AccSet are illustrated below.
Example 1
AccSet 50, 100;
The acceleration is limited to 50% of the normal value.
Example 2
AccSet 100, 50;
The acceleration ramp is limited to 50% of the normal value.
Arguments
AccSet Acc Ramp
Acc
Data type: num
Acceleration and deceleration as a percentage of the normal values. 100% corresponds to
maximum acceleration. Maximum value: 100%. Input value < 20% gives 20% of maximum
acceleration.
Ramp
Data type: num
The rate at which acceleration and deceleration increases as a percentage of the normal
values. Jerking can be restricted by reducing this value. 100% corresponds to maximum rate.
Maximum value: 100%. Input value < 10% gives 10% of maximum rate.
Continues on next page
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
3HAC 16581-1 Revision: J
16
© Copyright 2004-2010 ABB. All rights reserved.
The figures show that reducing the acceleration results in smoother movements.
xx0500002146
Program execution
The acceleration applies to both the robot and external axes until a new AccSet instruction
is executed.
The default values (100%) are automatically set
•
at a cold start.
•
when a new program is loaded.
•
when starting program execution from the beginning.
Syntax
AccSet
[ Acc ':=' ] < expression ( IN ) of num > ','
[ Ramp ':=' ] < expression ( IN ) of num > ';'
Related information
Ti
For information about
See
Control acceleration in world coordinate
system
WorldAccLim - Control acceleration in world
coordinate system on page 707
Reduce TCP acceleration along the
path
PathAccLim - Reduce TCP acceleration along the
path on page 295
Positioning instructions
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 18
|
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
15
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1 Instructions
1.1. AccSet - Reduces the acceleration
Usage
AccSet is used when handling fragile loads. It allows slower acceleration and deceleration,
which results in smoother robot movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction AccSet are illustrated below.
Example 1
AccSet 50, 100;
The acceleration is limited to 50% of the normal value.
Example 2
AccSet 100, 50;
The acceleration ramp is limited to 50% of the normal value.
Arguments
AccSet Acc Ramp
Acc
Data type: num
Acceleration and deceleration as a percentage of the normal values. 100% corresponds to
maximum acceleration. Maximum value: 100%. Input value < 20% gives 20% of maximum
acceleration.
Ramp
Data type: num
The rate at which acceleration and deceleration increases as a percentage of the normal
values. Jerking can be restricted by reducing this value. 100% corresponds to maximum rate.
Maximum value: 100%. Input value < 10% gives 10% of maximum rate.
Continues on next page
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
3HAC 16581-1 Revision: J
16
© Copyright 2004-2010 ABB. All rights reserved.
The figures show that reducing the acceleration results in smoother movements.
xx0500002146
Program execution
The acceleration applies to both the robot and external axes until a new AccSet instruction
is executed.
The default values (100%) are automatically set
•
at a cold start.
•
when a new program is loaded.
•
when starting program execution from the beginning.
Syntax
AccSet
[ Acc ':=' ] < expression ( IN ) of num > ','
[ Ramp ':=' ] < expression ( IN ) of num > ';'
Related information
Ti
For information about
See
Control acceleration in world coordinate
system
WorldAccLim - Control acceleration in world
coordinate system on page 707
Reduce TCP acceleration along the
path
PathAccLim - Reduce TCP acceleration along the
path on page 295
Positioning instructions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
17
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.2. ActUnit - Activates a mechanical unit
Usage
ActUnit is used to activate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction ActUnit is illustrated below.
Example 1
ActUnit orbit_a;
Activation of the orbit_a mechanical unit.
Arguments
ActUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be activated.
Program execution
When the robots and external axes actual path is ready, the path on current path level is
cleared and the specified mechanical unit is activated. This means that it is controlled and
monitored by the robot.
If several mechanical units share a common drive unit, activation of one of these mechanical
units will also connect that unit to the common drive unit.
Limitations
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
ActUnit cannot be executed in a RAPID routine connected to any of the following special
system events: PowerOn, Stop, QStop, Restart, Reset.or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. Such operation
on the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
ActUnit
[MechUnit ':=' ] < variable ( VAR ) of mecunit> ';'
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 19
|
1 Instructions
1.1. AccSet - Reduces the acceleration
RobotWare - OS
3HAC 16581-1 Revision: J
16
© Copyright 2004-2010 ABB. All rights reserved.
The figures show that reducing the acceleration results in smoother movements.
xx0500002146
Program execution
The acceleration applies to both the robot and external axes until a new AccSet instruction
is executed.
The default values (100%) are automatically set
•
at a cold start.
•
when a new program is loaded.
•
when starting program execution from the beginning.
Syntax
AccSet
[ Acc ':=' ] < expression ( IN ) of num > ','
[ Ramp ':=' ] < expression ( IN ) of num > ';'
Related information
Ti
For information about
See
Control acceleration in world coordinate
system
WorldAccLim - Control acceleration in world
coordinate system on page 707
Reduce TCP acceleration along the
path
PathAccLim - Reduce TCP acceleration along the
path on page 295
Positioning instructions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
17
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.2. ActUnit - Activates a mechanical unit
Usage
ActUnit is used to activate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction ActUnit is illustrated below.
Example 1
ActUnit orbit_a;
Activation of the orbit_a mechanical unit.
Arguments
ActUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be activated.
Program execution
When the robots and external axes actual path is ready, the path on current path level is
cleared and the specified mechanical unit is activated. This means that it is controlled and
monitored by the robot.
If several mechanical units share a common drive unit, activation of one of these mechanical
units will also connect that unit to the common drive unit.
Limitations
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
ActUnit cannot be executed in a RAPID routine connected to any of the following special
system events: PowerOn, Stop, QStop, Restart, Reset.or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. Such operation
on the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
ActUnit
[MechUnit ':=' ] < variable ( VAR ) of mecunit> ';'
Continues on next page
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
18
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Deactivating mechanical units
DeactUnit - Deactivates a mechanical unit on page 79
Mechanical units
mecunit - Mechanical unit on page 1139
More examples
DeactUnit - Deactivates a mechanical unit on page 79
Path Recorder
PathRecMoveBwd - Move path recorder backwards on
page 298
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 20
|
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
17
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.2. ActUnit - Activates a mechanical unit
Usage
ActUnit is used to activate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction ActUnit is illustrated below.
Example 1
ActUnit orbit_a;
Activation of the orbit_a mechanical unit.
Arguments
ActUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be activated.
Program execution
When the robots and external axes actual path is ready, the path on current path level is
cleared and the specified mechanical unit is activated. This means that it is controlled and
monitored by the robot.
If several mechanical units share a common drive unit, activation of one of these mechanical
units will also connect that unit to the common drive unit.
Limitations
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
ActUnit cannot be executed in a RAPID routine connected to any of the following special
system events: PowerOn, Stop, QStop, Restart, Reset.or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. Such operation
on the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
ActUnit
[MechUnit ':=' ] < variable ( VAR ) of mecunit> ';'
Continues on next page
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
18
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Deactivating mechanical units
DeactUnit - Deactivates a mechanical unit on page 79
Mechanical units
mecunit - Mechanical unit on page 1139
More examples
DeactUnit - Deactivates a mechanical unit on page 79
Path Recorder
PathRecMoveBwd - Move path recorder backwards on
page 298
Continued
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
19
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.3. Add - Adds a numeric value
Usage
Add is used to add or subtract a value to or from a numeric variable or persistent.
Basic examples
Basic examples of the instruction Add are illustrated below.
Example 1
Add reg1, 3;
3 is added to reg1 , i.e. reg1:=reg1+3 .
Example 2
Add reg1, -reg2;
The value of reg2 is subtracted from reg1 , i.e. reg1:=reg1-reg2 .
Example 3
VAR dnum mydnum:=5;
Add mydnum, 500000000;
500000000 is added to mydnum , i.e. mynum:=mynum+500000000.
Example 4
VAR dnum mydnum:=5000;
VAR num mynum:=6000;
Add mynum, DnumToNum(mydnum \Integer);
5000 is added to mynum , i.e. mynum:=mynum+5000 . You have to use DnumToNum to get a
num numeric value that you can use together with the num variable mynum .
Arguments
Add Name | Dname AddValue | AddDvalue
Name
Data type: num
The name of the variable or persistent to be changed.
Dname
Data type: dnum
The name of the variable or persistent to be changed.
AddValue
Data type: num
The value to be added.
AddDvalue
Data type: dnum
The value to be added.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 21
|
1 Instructions
1.2. ActUnit - Activates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
18
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Deactivating mechanical units
DeactUnit - Deactivates a mechanical unit on page 79
Mechanical units
mecunit - Mechanical unit on page 1139
More examples
DeactUnit - Deactivates a mechanical unit on page 79
Path Recorder
PathRecMoveBwd - Move path recorder backwards on
page 298
Continued
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
19
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.3. Add - Adds a numeric value
Usage
Add is used to add or subtract a value to or from a numeric variable or persistent.
Basic examples
Basic examples of the instruction Add are illustrated below.
Example 1
Add reg1, 3;
3 is added to reg1 , i.e. reg1:=reg1+3 .
Example 2
Add reg1, -reg2;
The value of reg2 is subtracted from reg1 , i.e. reg1:=reg1-reg2 .
Example 3
VAR dnum mydnum:=5;
Add mydnum, 500000000;
500000000 is added to mydnum , i.e. mynum:=mynum+500000000.
Example 4
VAR dnum mydnum:=5000;
VAR num mynum:=6000;
Add mynum, DnumToNum(mydnum \Integer);
5000 is added to mynum , i.e. mynum:=mynum+5000 . You have to use DnumToNum to get a
num numeric value that you can use together with the num variable mynum .
Arguments
Add Name | Dname AddValue | AddDvalue
Name
Data type: num
The name of the variable or persistent to be changed.
Dname
Data type: dnum
The name of the variable or persistent to be changed.
AddValue
Data type: num
The value to be added.
AddDvalue
Data type: dnum
The value to be added.
Continues on next page
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
3HAC 16581-1 Revision: J
20
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
If the value to be added is of the type dnum , and the variable/persistent that should be changed
is a num , a runtime error will be generated. The combination of arguments is not possible (see
Example 4 above how to solve this).
Syntax
Add
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum > ’,’
[ AddValue ':=' ] < expression ( IN ) of num >
| [ AddDvalue’ :=’ ] < expression ( IN ) of dnum > ’;’
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 22
|
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
19
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.3. Add - Adds a numeric value
Usage
Add is used to add or subtract a value to or from a numeric variable or persistent.
Basic examples
Basic examples of the instruction Add are illustrated below.
Example 1
Add reg1, 3;
3 is added to reg1 , i.e. reg1:=reg1+3 .
Example 2
Add reg1, -reg2;
The value of reg2 is subtracted from reg1 , i.e. reg1:=reg1-reg2 .
Example 3
VAR dnum mydnum:=5;
Add mydnum, 500000000;
500000000 is added to mydnum , i.e. mynum:=mynum+500000000.
Example 4
VAR dnum mydnum:=5000;
VAR num mynum:=6000;
Add mynum, DnumToNum(mydnum \Integer);
5000 is added to mynum , i.e. mynum:=mynum+5000 . You have to use DnumToNum to get a
num numeric value that you can use together with the num variable mynum .
Arguments
Add Name | Dname AddValue | AddDvalue
Name
Data type: num
The name of the variable or persistent to be changed.
Dname
Data type: dnum
The name of the variable or persistent to be changed.
AddValue
Data type: num
The value to be added.
AddDvalue
Data type: dnum
The value to be added.
Continues on next page
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
3HAC 16581-1 Revision: J
20
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
If the value to be added is of the type dnum , and the variable/persistent that should be changed
is a num , a runtime error will be generated. The combination of arguments is not possible (see
Example 4 above how to solve this).
Syntax
Add
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum > ’,’
[ AddValue ':=' ] < expression ( IN ) of num >
| [ AddDvalue’ :=’ ] < expression ( IN ) of dnum > ’;’
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
21
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.4. AliasIO - Define I/O signal with alias name
Usage
AliasIO is used to define a signal of any type with an alias name or to use signals in built-
in task modules.
Signals with alias names can be used for predefined generic programs, without any
modification of the program before running in different robot installations.
The instruction AliasIO must be run before any use of the actual signal. See Basic examples
on page 21 for loaded modules, and More examples on page 22 for installed modules.
Basic examples
A basic example of the instruction AliasIO is illustrated below.
See also More examples on page 22 .
Example 1
VAR signaldo alias_do;
PROC prog_start()
AliasIO config_do, alias_do;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defining digital output signal alias_do is connected to the configured digital
output signal config_do at program start.
Arguments
AliasIO FromSignal ToSignal
FromSignal
Data type: signalxx or string
Loaded modules:
The signal identifier named according to the configuration (data type signalxx ) from which
the signal descriptor is copied. The signal must be defined in the I/O configuration.
Installed modules or loaded modules:
A reference ( CONST , VAR or parameter of these) containing the name of the signal (data type
string ) from which the signal descriptor after search in the system is copied. The signal
must be defined in the I/O configuration.
ToSignal
Data type: signalxx
The signal identifier according to the program (data type signalxx ) to which the signal
descriptor is copied. The signal must be declared in the RAPID program.
The same data type must be used (or found) for the arguments FromSignal and ToSignal
and must be one of type signalxx ( signalai , signalao , signaldi , signaldo ,
signalgi , or signalgo ).
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 23
|
1 Instructions
1.3. Add - Adds a numeric value
RobotWare - OS
3HAC 16581-1 Revision: J
20
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
If the value to be added is of the type dnum , and the variable/persistent that should be changed
is a num , a runtime error will be generated. The combination of arguments is not possible (see
Example 4 above how to solve this).
Syntax
Add
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum > ’,’
[ AddValue ':=' ] < expression ( IN ) of num >
| [ AddDvalue’ :=’ ] < expression ( IN ) of dnum > ’;’
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
21
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.4. AliasIO - Define I/O signal with alias name
Usage
AliasIO is used to define a signal of any type with an alias name or to use signals in built-
in task modules.
Signals with alias names can be used for predefined generic programs, without any
modification of the program before running in different robot installations.
The instruction AliasIO must be run before any use of the actual signal. See Basic examples
on page 21 for loaded modules, and More examples on page 22 for installed modules.
Basic examples
A basic example of the instruction AliasIO is illustrated below.
See also More examples on page 22 .
Example 1
VAR signaldo alias_do;
PROC prog_start()
AliasIO config_do, alias_do;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defining digital output signal alias_do is connected to the configured digital
output signal config_do at program start.
Arguments
AliasIO FromSignal ToSignal
FromSignal
Data type: signalxx or string
Loaded modules:
The signal identifier named according to the configuration (data type signalxx ) from which
the signal descriptor is copied. The signal must be defined in the I/O configuration.
Installed modules or loaded modules:
A reference ( CONST , VAR or parameter of these) containing the name of the signal (data type
string ) from which the signal descriptor after search in the system is copied. The signal
must be defined in the I/O configuration.
ToSignal
Data type: signalxx
The signal identifier according to the program (data type signalxx ) to which the signal
descriptor is copied. The signal must be declared in the RAPID program.
The same data type must be used (or found) for the arguments FromSignal and ToSignal
and must be one of type signalxx ( signalai , signalao , signaldi , signaldo ,
signalgi , or signalgo ).
Continues on next page
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
3HAC 16581-1 Revision: J
22
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The signal descriptor value is copied from the signal given in argument FromSignal to the
signal given in argument ToSignal .
Error handling
Following recoverable errors can be generated. The errors can be handled in an error handler.
The system variable ERRNO will be set to:
More examples
More examples of the instruction AliasIO are illustrated below.
Example 1
VAR signaldi alias_di;
PROC prog_start()
CONST string config_string := "config_di";
AliasIO config_string, alias_di;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defined digital input signal alias_di is connected to the configured digital input
signal config_di (via constant config_string ) at program start.
Limitation
When starting the program, the alias signal cannot be used until the AliasIO instruction is
executed.
Instruction AliasIO must be placed
•
either in the event routine executed at program start (event START )
•
or in the program part executed after every program start (before use of the signal)
In order to prevent mistakes it is not recommended to use dynamic reconnection of an
AliasIO signal to different physical signals.
Syntax
AliasIO
[ FromSignal ':=' ] < reference ( REF ) of anytype> ','
[ ToSignal ':=' ] < variable ( VAR ) of anytype> ';'
ERR_ALIASIO_DEF
The FromSignal is not defined in the IO configuration
or the ToSignal is not declared in the RAPID program
or the ToSignal is defined in the IO configuration.
ERR_ALIASIO_TYPE
The data types for the arguments FromSignal and
ToSignal is not the same type.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 24
|
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
21
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.4. AliasIO - Define I/O signal with alias name
Usage
AliasIO is used to define a signal of any type with an alias name or to use signals in built-
in task modules.
Signals with alias names can be used for predefined generic programs, without any
modification of the program before running in different robot installations.
The instruction AliasIO must be run before any use of the actual signal. See Basic examples
on page 21 for loaded modules, and More examples on page 22 for installed modules.
Basic examples
A basic example of the instruction AliasIO is illustrated below.
See also More examples on page 22 .
Example 1
VAR signaldo alias_do;
PROC prog_start()
AliasIO config_do, alias_do;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defining digital output signal alias_do is connected to the configured digital
output signal config_do at program start.
Arguments
AliasIO FromSignal ToSignal
FromSignal
Data type: signalxx or string
Loaded modules:
The signal identifier named according to the configuration (data type signalxx ) from which
the signal descriptor is copied. The signal must be defined in the I/O configuration.
Installed modules or loaded modules:
A reference ( CONST , VAR or parameter of these) containing the name of the signal (data type
string ) from which the signal descriptor after search in the system is copied. The signal
must be defined in the I/O configuration.
ToSignal
Data type: signalxx
The signal identifier according to the program (data type signalxx ) to which the signal
descriptor is copied. The signal must be declared in the RAPID program.
The same data type must be used (or found) for the arguments FromSignal and ToSignal
and must be one of type signalxx ( signalai , signalao , signaldi , signaldo ,
signalgi , or signalgo ).
Continues on next page
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
3HAC 16581-1 Revision: J
22
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The signal descriptor value is copied from the signal given in argument FromSignal to the
signal given in argument ToSignal .
Error handling
Following recoverable errors can be generated. The errors can be handled in an error handler.
The system variable ERRNO will be set to:
More examples
More examples of the instruction AliasIO are illustrated below.
Example 1
VAR signaldi alias_di;
PROC prog_start()
CONST string config_string := "config_di";
AliasIO config_string, alias_di;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defined digital input signal alias_di is connected to the configured digital input
signal config_di (via constant config_string ) at program start.
Limitation
When starting the program, the alias signal cannot be used until the AliasIO instruction is
executed.
Instruction AliasIO must be placed
•
either in the event routine executed at program start (event START )
•
or in the program part executed after every program start (before use of the signal)
In order to prevent mistakes it is not recommended to use dynamic reconnection of an
AliasIO signal to different physical signals.
Syntax
AliasIO
[ FromSignal ':=' ] < reference ( REF ) of anytype> ','
[ ToSignal ':=' ] < variable ( VAR ) of anytype> ';'
ERR_ALIASIO_DEF
The FromSignal is not defined in the IO configuration
or the ToSignal is not declared in the RAPID program
or the ToSignal is defined in the IO configuration.
ERR_ALIASIO_TYPE
The data types for the arguments FromSignal and
ToSignal is not the same type.
Continued
Continues on next page
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
23
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Input/Output instructions
Technical reference manual - RAPID overview
Input/Output functionality in general Technical reference manual - RAPID overview
Configuration of I/O
Technical reference manual - System parameters
Defining event routines
Technical reference manual - System parameters
Loaded/Installed task modules
Technical reference manual - System parameters
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 25
|
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
3HAC 16581-1 Revision: J
22
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The signal descriptor value is copied from the signal given in argument FromSignal to the
signal given in argument ToSignal .
Error handling
Following recoverable errors can be generated. The errors can be handled in an error handler.
The system variable ERRNO will be set to:
More examples
More examples of the instruction AliasIO are illustrated below.
Example 1
VAR signaldi alias_di;
PROC prog_start()
CONST string config_string := "config_di";
AliasIO config_string, alias_di;
ENDPROC
The routine prog_start is connected to the START event in system parameters. The
program defined digital input signal alias_di is connected to the configured digital input
signal config_di (via constant config_string ) at program start.
Limitation
When starting the program, the alias signal cannot be used until the AliasIO instruction is
executed.
Instruction AliasIO must be placed
•
either in the event routine executed at program start (event START )
•
or in the program part executed after every program start (before use of the signal)
In order to prevent mistakes it is not recommended to use dynamic reconnection of an
AliasIO signal to different physical signals.
Syntax
AliasIO
[ FromSignal ':=' ] < reference ( REF ) of anytype> ','
[ ToSignal ':=' ] < variable ( VAR ) of anytype> ';'
ERR_ALIASIO_DEF
The FromSignal is not defined in the IO configuration
or the ToSignal is not declared in the RAPID program
or the ToSignal is defined in the IO configuration.
ERR_ALIASIO_TYPE
The data types for the arguments FromSignal and
ToSignal is not the same type.
Continued
Continues on next page
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
23
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Input/Output instructions
Technical reference manual - RAPID overview
Input/Output functionality in general Technical reference manual - RAPID overview
Configuration of I/O
Technical reference manual - System parameters
Defining event routines
Technical reference manual - System parameters
Loaded/Installed task modules
Technical reference manual - System parameters
Continued
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
3HAC 16581-1 Revision: J
24
© Copyright 2004-2010 ABB. All rights reserved.
1.5. ":=" - Assigns a value
Usage
The “ := ” instruction is used to assign a new value to data. This value can be anything from a
constant value to an arithmetic expression, e.g. reg1 +5* reg3 .
Basic examples
Basic examples of the instruction “ := ” are illustrated below.
See also More examples on page 24 .
Example 1
reg1 := 5;
reg1 is assigned the value 5 .
Example 2
reg1 := reg2 - reg3;
reg1 is assigned the value that the reg2-reg3 calculation returns.
Example 3
counter := counter + 1;
counter is incremented by one.
Arguments
Data := Value
Data
Data type: All
The data that is to be assigned a new value.
Value
Data type: Same as Data
The desired value.
More examples
More examples of the instruction “ := ” are illustrated below.
Example 1
tool1.tframe.trans.x := tool1.tframe.trans.x + 20;
The TCP for tool1 is shifted 20 mm in the X-direction.
Example 2
pallet{5,8} := Abs(value);
An element in the pallet matrix is assigned a value equal to the absolute value of the value
variable.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 26
|
1 Instructions
1.4. AliasIO - Define I/O signal with alias name
RobotWare - OS
23
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Input/Output instructions
Technical reference manual - RAPID overview
Input/Output functionality in general Technical reference manual - RAPID overview
Configuration of I/O
Technical reference manual - System parameters
Defining event routines
Technical reference manual - System parameters
Loaded/Installed task modules
Technical reference manual - System parameters
Continued
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
3HAC 16581-1 Revision: J
24
© Copyright 2004-2010 ABB. All rights reserved.
1.5. ":=" - Assigns a value
Usage
The “ := ” instruction is used to assign a new value to data. This value can be anything from a
constant value to an arithmetic expression, e.g. reg1 +5* reg3 .
Basic examples
Basic examples of the instruction “ := ” are illustrated below.
See also More examples on page 24 .
Example 1
reg1 := 5;
reg1 is assigned the value 5 .
Example 2
reg1 := reg2 - reg3;
reg1 is assigned the value that the reg2-reg3 calculation returns.
Example 3
counter := counter + 1;
counter is incremented by one.
Arguments
Data := Value
Data
Data type: All
The data that is to be assigned a new value.
Value
Data type: Same as Data
The desired value.
More examples
More examples of the instruction “ := ” are illustrated below.
Example 1
tool1.tframe.trans.x := tool1.tframe.trans.x + 20;
The TCP for tool1 is shifted 20 mm in the X-direction.
Example 2
pallet{5,8} := Abs(value);
An element in the pallet matrix is assigned a value equal to the absolute value of the value
variable.
Continues on next page
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
25
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
The data (whose value is to be changed) must not be
•
a constant
•
a non-value data type.
The data and value must have similar (the same or alias) data types.
Syntax
(EBNF)
<assignment target> ':=' <expression> ';'
<assignment target> ::=
<variable>
| <persistent>
| <parameter>
| <VAR>
Related information
For information about
See
Expressions
Technical reference manual - RAPID overview
Non-value data types
Technical reference manual - RAPID overview
Assigning an initial value to data
Operating manual - IRC5 with FlexPendant
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 27
|
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
3HAC 16581-1 Revision: J
24
© Copyright 2004-2010 ABB. All rights reserved.
1.5. ":=" - Assigns a value
Usage
The “ := ” instruction is used to assign a new value to data. This value can be anything from a
constant value to an arithmetic expression, e.g. reg1 +5* reg3 .
Basic examples
Basic examples of the instruction “ := ” are illustrated below.
See also More examples on page 24 .
Example 1
reg1 := 5;
reg1 is assigned the value 5 .
Example 2
reg1 := reg2 - reg3;
reg1 is assigned the value that the reg2-reg3 calculation returns.
Example 3
counter := counter + 1;
counter is incremented by one.
Arguments
Data := Value
Data
Data type: All
The data that is to be assigned a new value.
Value
Data type: Same as Data
The desired value.
More examples
More examples of the instruction “ := ” are illustrated below.
Example 1
tool1.tframe.trans.x := tool1.tframe.trans.x + 20;
The TCP for tool1 is shifted 20 mm in the X-direction.
Example 2
pallet{5,8} := Abs(value);
An element in the pallet matrix is assigned a value equal to the absolute value of the value
variable.
Continues on next page
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
25
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
The data (whose value is to be changed) must not be
•
a constant
•
a non-value data type.
The data and value must have similar (the same or alias) data types.
Syntax
(EBNF)
<assignment target> ':=' <expression> ';'
<assignment target> ::=
<variable>
| <persistent>
| <parameter>
| <VAR>
Related information
For information about
See
Expressions
Technical reference manual - RAPID overview
Non-value data types
Technical reference manual - RAPID overview
Assigning an initial value to data
Operating manual - IRC5 with FlexPendant
Continued
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
26
© Copyright 2004-2010 ABB. All rights reserved.
1.6. BitClear - Clear a specified bit in a byte data
Usage
BitClear is used to clear (set to 0) a specified bit in a defined byte data.
Basic examples
A basic example of the instruction BitClear is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 130;
BitClear data1, parity_bit;
Bit number 8 (parity_bit) in the variable data1 will be set to 0, e.g. the content of the variable
data1 will be changed from 130 to 2 (integer representation). Bit manipulation of data type
byte when using BitClear is illustrated in the figure below.
xx0500002147
Arguments
BitClear BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 0.
Limitations
The range for a data type byte is 0 - 255 decimal.
The bit position is valid from 1 - 8.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 28
|
1 Instructions
1.5. ":=" - Assigns a value
RobotWare - OS
25
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
The data (whose value is to be changed) must not be
•
a constant
•
a non-value data type.
The data and value must have similar (the same or alias) data types.
Syntax
(EBNF)
<assignment target> ':=' <expression> ';'
<assignment target> ::=
<variable>
| <persistent>
| <parameter>
| <VAR>
Related information
For information about
See
Expressions
Technical reference manual - RAPID overview
Non-value data types
Technical reference manual - RAPID overview
Assigning an initial value to data
Operating manual - IRC5 with FlexPendant
Continued
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
26
© Copyright 2004-2010 ABB. All rights reserved.
1.6. BitClear - Clear a specified bit in a byte data
Usage
BitClear is used to clear (set to 0) a specified bit in a defined byte data.
Basic examples
A basic example of the instruction BitClear is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 130;
BitClear data1, parity_bit;
Bit number 8 (parity_bit) in the variable data1 will be set to 0, e.g. the content of the variable
data1 will be changed from 130 to 2 (integer representation). Bit manipulation of data type
byte when using BitClear is illustrated in the figure below.
xx0500002147
Arguments
BitClear BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 0.
Limitations
The range for a data type byte is 0 - 255 decimal.
The bit position is valid from 1 - 8.
Continues on next page
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
27
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitClear
[ BitData ':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos ':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Set a specified bit in a byte data
BitSet - Set a specified bit in a byte data on page
28
Check if a specified bit in a byte data is set BitCheck - Check if a specified bit in a byte data
is set on page 772
Other bit functions
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 29
|
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
26
© Copyright 2004-2010 ABB. All rights reserved.
1.6. BitClear - Clear a specified bit in a byte data
Usage
BitClear is used to clear (set to 0) a specified bit in a defined byte data.
Basic examples
A basic example of the instruction BitClear is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 130;
BitClear data1, parity_bit;
Bit number 8 (parity_bit) in the variable data1 will be set to 0, e.g. the content of the variable
data1 will be changed from 130 to 2 (integer representation). Bit manipulation of data type
byte when using BitClear is illustrated in the figure below.
xx0500002147
Arguments
BitClear BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 0.
Limitations
The range for a data type byte is 0 - 255 decimal.
The bit position is valid from 1 - 8.
Continues on next page
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
27
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitClear
[ BitData ':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos ':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Set a specified bit in a byte data
BitSet - Set a specified bit in a byte data on page
28
Check if a specified bit in a byte data is set BitCheck - Check if a specified bit in a byte data
is set on page 772
Other bit functions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
28
© Copyright 2004-2010 ABB. All rights reserved.
1.7. BitSet - Set a specified bit in a byte data
Usage
BitSet is used to set a specified bit to 1 in a defined byte data.
Basic examples
A basic example of the instruction BitSet is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 2;
BitSet data1, parity_bit;
Bit number 8 ( parity_bit ) in the variable data1 will be set to 1 , e.g. the content of the
variable data1 will be changed from 2 to 130 (integer representation). Bit manipulation of
data type byte when using BitSet is illustrated in the figure below.
xx0500002148
Arguments
BitSet BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 1.
Limitations
The range for a data type byte is integer 0 - 255.
The bit position is valid from 1 - 8.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 30
|
1 Instructions
1.6. BitClear - Clear a specified bit in a byte data
RobotWare - OS
27
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitClear
[ BitData ':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos ':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Set a specified bit in a byte data
BitSet - Set a specified bit in a byte data on page
28
Check if a specified bit in a byte data is set BitCheck - Check if a specified bit in a byte data
is set on page 772
Other bit functions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
28
© Copyright 2004-2010 ABB. All rights reserved.
1.7. BitSet - Set a specified bit in a byte data
Usage
BitSet is used to set a specified bit to 1 in a defined byte data.
Basic examples
A basic example of the instruction BitSet is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 2;
BitSet data1, parity_bit;
Bit number 8 ( parity_bit ) in the variable data1 will be set to 1 , e.g. the content of the
variable data1 will be changed from 2 to 130 (integer representation). Bit manipulation of
data type byte when using BitSet is illustrated in the figure below.
xx0500002148
Arguments
BitSet BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 1.
Limitations
The range for a data type byte is integer 0 - 255.
The bit position is valid from 1 - 8.
Continues on next page
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
29
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitSet
[ BitData':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Clear a specified bit in a byte data
BitClear - Clear a specified bit in a byte data
on page 26
Check if a specified bit in a byte data is set
BitCheck - Check if a specified bit in a byte
data is set on page 772
Other bit functions
Technical reference manual - RAPID
overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 31
|
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
3HAC 16581-1 Revision: J
28
© Copyright 2004-2010 ABB. All rights reserved.
1.7. BitSet - Set a specified bit in a byte data
Usage
BitSet is used to set a specified bit to 1 in a defined byte data.
Basic examples
A basic example of the instruction BitSet is illustrated below.
Example 1
CONST num parity_bit := 8;
VAR byte data1 := 2;
BitSet data1, parity_bit;
Bit number 8 ( parity_bit ) in the variable data1 will be set to 1 , e.g. the content of the
variable data1 will be changed from 2 to 130 (integer representation). Bit manipulation of
data type byte when using BitSet is illustrated in the figure below.
xx0500002148
Arguments
BitSet BitData BitPos
BitData
Data type: byte
The bit data, in integer representation, to be changed.
BitPos
Bit Position
Data type: num
The bit position (1-8) in the BitData to be set to 1.
Limitations
The range for a data type byte is integer 0 - 255.
The bit position is valid from 1 - 8.
Continues on next page
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
29
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitSet
[ BitData':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Clear a specified bit in a byte data
BitClear - Clear a specified bit in a byte data
on page 26
Check if a specified bit in a byte data is set
BitCheck - Check if a specified bit in a byte
data is set on page 772
Other bit functions
Technical reference manual - RAPID
overview
Continued
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
3HAC 16581-1 Revision: J
30
© Copyright 2004-2010 ABB. All rights reserved.
1.8. BookErrNo - Book a RAPID system error number
Usage
BookErrNo is used to book a new RAPID system error number.
Basic examples
A basic example of the instruction BookErrNo is illustrated below.
Example 1
! Introduce a new error number in a glue system
! Note: The new error variable must be declared with the initial
value -1
VAR errnum ERR_GLUEFLOW := -1;
! Book the new RAPID system error number
BookErrNo ERR_GLUEFLOW;
The variable ERR_GLUEFLOW will be assigned to a free system error number for use in the
RAPID code.
! Use the new error number
IF di1 = 0 THEN
RAISE ERR_GLUEFLOW;
ELSE
...
ENDIF
! Error handling
ERROR
IF ERRNO = ERR_GLUEFLOW THEN
...
ELSE
...
ENDIF
If the digital input di1 is 0 , the new booked error number will be raised and the system error
variable ERRNO will be set to the new booked error number. The error handling of those user
generated errors can then be handled in the error handler as usual.
Arguments
BookErrNo ErrorName
ErrorName
Data type: errnum
The new RAPID system error variable name.
Limitations
The new error variable must not be declared as a routine variable.
The new error variable must be declared with an initial value of -1, that gives the information
that this error should be a RAPID system error.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 32
|
1 Instructions
1.7. BitSet - Set a specified bit in a byte data
RobotWare - OS
29
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BitSet
[ BitData':=' ] < var or pers ( INOUT ) of byte > ','
[ BitPos':=' ] < expression ( IN ) of num > ';'
Related information
For information about
See
Clear a specified bit in a byte data
BitClear - Clear a specified bit in a byte data
on page 26
Check if a specified bit in a byte data is set
BitCheck - Check if a specified bit in a byte
data is set on page 772
Other bit functions
Technical reference manual - RAPID
overview
Continued
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
3HAC 16581-1 Revision: J
30
© Copyright 2004-2010 ABB. All rights reserved.
1.8. BookErrNo - Book a RAPID system error number
Usage
BookErrNo is used to book a new RAPID system error number.
Basic examples
A basic example of the instruction BookErrNo is illustrated below.
Example 1
! Introduce a new error number in a glue system
! Note: The new error variable must be declared with the initial
value -1
VAR errnum ERR_GLUEFLOW := -1;
! Book the new RAPID system error number
BookErrNo ERR_GLUEFLOW;
The variable ERR_GLUEFLOW will be assigned to a free system error number for use in the
RAPID code.
! Use the new error number
IF di1 = 0 THEN
RAISE ERR_GLUEFLOW;
ELSE
...
ENDIF
! Error handling
ERROR
IF ERRNO = ERR_GLUEFLOW THEN
...
ELSE
...
ENDIF
If the digital input di1 is 0 , the new booked error number will be raised and the system error
variable ERRNO will be set to the new booked error number. The error handling of those user
generated errors can then be handled in the error handler as usual.
Arguments
BookErrNo ErrorName
ErrorName
Data type: errnum
The new RAPID system error variable name.
Limitations
The new error variable must not be declared as a routine variable.
The new error variable must be declared with an initial value of -1, that gives the information
that this error should be a RAPID system error.
Continues on next page
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
31
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BookErrNo
[ ErrorName ':='] < variable ( VAR ) of errnum > ';'
Related information
For information about
See
Error handling
Technical reference manual - RAPID overview
Error number
errnum - Error number on page 1108
Call an error handler
RAISE - Calls an error handler on page 334
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 33
|
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
3HAC 16581-1 Revision: J
30
© Copyright 2004-2010 ABB. All rights reserved.
1.8. BookErrNo - Book a RAPID system error number
Usage
BookErrNo is used to book a new RAPID system error number.
Basic examples
A basic example of the instruction BookErrNo is illustrated below.
Example 1
! Introduce a new error number in a glue system
! Note: The new error variable must be declared with the initial
value -1
VAR errnum ERR_GLUEFLOW := -1;
! Book the new RAPID system error number
BookErrNo ERR_GLUEFLOW;
The variable ERR_GLUEFLOW will be assigned to a free system error number for use in the
RAPID code.
! Use the new error number
IF di1 = 0 THEN
RAISE ERR_GLUEFLOW;
ELSE
...
ENDIF
! Error handling
ERROR
IF ERRNO = ERR_GLUEFLOW THEN
...
ELSE
...
ENDIF
If the digital input di1 is 0 , the new booked error number will be raised and the system error
variable ERRNO will be set to the new booked error number. The error handling of those user
generated errors can then be handled in the error handler as usual.
Arguments
BookErrNo ErrorName
ErrorName
Data type: errnum
The new RAPID system error variable name.
Limitations
The new error variable must not be declared as a routine variable.
The new error variable must be declared with an initial value of -1, that gives the information
that this error should be a RAPID system error.
Continues on next page
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
31
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BookErrNo
[ ErrorName ':='] < variable ( VAR ) of errnum > ';'
Related information
For information about
See
Error handling
Technical reference manual - RAPID overview
Error number
errnum - Error number on page 1108
Call an error handler
RAISE - Calls an error handler on page 334
Continued
1 Instructions
1.9. Break - Break program execution
RobotWare - OS
3HAC 16581-1 Revision: J
32
© Copyright 2004-2010 ABB. All rights reserved.
1.9. Break - Break program execution
Usage
Break is used to make an immediate break in program execution for RAPID program code
debugging purposes. The robot movement is stopped at once.
Basic examples
A basic example of the instruction Break is illustrated below.
Example 1
...
Break;
...
Program execution stops and it is possible to analyze variables, values etc. for debugging
purposes.
Program execution
The instruction stops program execution at once, without waiting for the robot and external
axes to reach their programmed destination points for the movement being performed at the
time. Program execution can then be restarted from the next instruction.
If there is a Break instruction in some routine event, the execution of the routine will be
interrupted and no STOP routine event will be executed. The routine event will be executed
from the beginning the next time the same event occurs.
Syntax
Break';'
Related information
For information about
See
Stopping for program actions
Stop - Stops program execution on page 510
Stopping after a fatal error
EXIT - Terminates program execution on page 105
Terminating program execution
EXIT - Terminates program execution on page 105
Only stopping robot movements
StopMove - Stops robot movement on page 515
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 34
|
1 Instructions
1.8. BookErrNo - Book a RAPID system error number
RobotWare - OS
31
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
BookErrNo
[ ErrorName ':='] < variable ( VAR ) of errnum > ';'
Related information
For information about
See
Error handling
Technical reference manual - RAPID overview
Error number
errnum - Error number on page 1108
Call an error handler
RAISE - Calls an error handler on page 334
Continued
1 Instructions
1.9. Break - Break program execution
RobotWare - OS
3HAC 16581-1 Revision: J
32
© Copyright 2004-2010 ABB. All rights reserved.
1.9. Break - Break program execution
Usage
Break is used to make an immediate break in program execution for RAPID program code
debugging purposes. The robot movement is stopped at once.
Basic examples
A basic example of the instruction Break is illustrated below.
Example 1
...
Break;
...
Program execution stops and it is possible to analyze variables, values etc. for debugging
purposes.
Program execution
The instruction stops program execution at once, without waiting for the robot and external
axes to reach their programmed destination points for the movement being performed at the
time. Program execution can then be restarted from the next instruction.
If there is a Break instruction in some routine event, the execution of the routine will be
interrupted and no STOP routine event will be executed. The routine event will be executed
from the beginning the next time the same event occurs.
Syntax
Break';'
Related information
For information about
See
Stopping for program actions
Stop - Stops program execution on page 510
Stopping after a fatal error
EXIT - Terminates program execution on page 105
Terminating program execution
EXIT - Terminates program execution on page 105
Only stopping robot movements
StopMove - Stops robot movement on page 515
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
33
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.10. CallByVar - Call a procedure by a variable
Usage
CallByVar ( Call By Variable ) can be used to call procedures with specific names, e.g.
proc_name1, proc_name2, proc_name3 ... proc_namex via a variable.
Basic examples
A basic example of the instruction CallByVar is illustrated below.
See also More examples on page 33 .
Example 1
reg1 := 2;
CallByVar "proc", reg1;
The procedure proc2 is called.
Arguments
CallByVar Name Number
Name
Data type: string
The first part of the procedure name, e.g. proc_name .
Number
Data type: num
The numeric value for the number of the procedure. This value will be converted to a string
and gives the 2nd part of the procedure name, e.g. 1 . The value must be a positive integer.
More examples
More examples of how to make static and dynamic selection of procedure call.
Example 1 - Static selection of procedure call
TEST reg1
CASE 1:
lf_door door_loc;
CASE 2:
rf_door door_loc;
CASE 3:
lr_door door_loc;
CASE 4:
rr_door door_loc;
DEFAULT:
EXIT;
ENDTEST
Depending on whether the value of register reg1 is 1, 2, 3, or 4, different procedures are
called that perform the appropriate type of work for the selected door. The door location in
argument door_loc .
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 35
|
1 Instructions
1.9. Break - Break program execution
RobotWare - OS
3HAC 16581-1 Revision: J
32
© Copyright 2004-2010 ABB. All rights reserved.
1.9. Break - Break program execution
Usage
Break is used to make an immediate break in program execution for RAPID program code
debugging purposes. The robot movement is stopped at once.
Basic examples
A basic example of the instruction Break is illustrated below.
Example 1
...
Break;
...
Program execution stops and it is possible to analyze variables, values etc. for debugging
purposes.
Program execution
The instruction stops program execution at once, without waiting for the robot and external
axes to reach their programmed destination points for the movement being performed at the
time. Program execution can then be restarted from the next instruction.
If there is a Break instruction in some routine event, the execution of the routine will be
interrupted and no STOP routine event will be executed. The routine event will be executed
from the beginning the next time the same event occurs.
Syntax
Break';'
Related information
For information about
See
Stopping for program actions
Stop - Stops program execution on page 510
Stopping after a fatal error
EXIT - Terminates program execution on page 105
Terminating program execution
EXIT - Terminates program execution on page 105
Only stopping robot movements
StopMove - Stops robot movement on page 515
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
33
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.10. CallByVar - Call a procedure by a variable
Usage
CallByVar ( Call By Variable ) can be used to call procedures with specific names, e.g.
proc_name1, proc_name2, proc_name3 ... proc_namex via a variable.
Basic examples
A basic example of the instruction CallByVar is illustrated below.
See also More examples on page 33 .
Example 1
reg1 := 2;
CallByVar "proc", reg1;
The procedure proc2 is called.
Arguments
CallByVar Name Number
Name
Data type: string
The first part of the procedure name, e.g. proc_name .
Number
Data type: num
The numeric value for the number of the procedure. This value will be converted to a string
and gives the 2nd part of the procedure name, e.g. 1 . The value must be a positive integer.
More examples
More examples of how to make static and dynamic selection of procedure call.
Example 1 - Static selection of procedure call
TEST reg1
CASE 1:
lf_door door_loc;
CASE 2:
rf_door door_loc;
CASE 3:
lr_door door_loc;
CASE 4:
rr_door door_loc;
DEFAULT:
EXIT;
ENDTEST
Depending on whether the value of register reg1 is 1, 2, 3, or 4, different procedures are
called that perform the appropriate type of work for the selected door. The door location in
argument door_loc .
Continues on next page
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
3HAC 16581-1 Revision: J
34
© Copyright 2004-2010 ABB. All rights reserved.
Example 2 - Dynamic selection of procedure call with RAPID syntax
reg1 := 2;
%"proc"+NumToStr(reg1,0)% door_loc;
The procedure proc2 is called with argument door_loc .
Limitation: All procedures must have a specific name e.g. proc1, proc2, proc3.
Example 3 - Dynamic selection of procedure call with CallByVar
reg1 := 2;
CallByVar "proc",reg1;
The procedure proc2 is called.
Limitation: All procedures must have specific name, e.g. proc1 , proc2 , proc3 , and no
arguments can be used.
Limitations
Can only be used to call procedures without parameters.
Can not be used to call LOCAL procedures.
Execution of CallByVar takes a little more time than execution of a normal procedure call.
Error handling
In the argument Number is < 0 or is not an integer, the system variable ERRNO is set to
ERR_ARGVALERR.
In reference to an unknown procedure, the system variable ERRNO is set to
ERR_REFUNKPRC.
In procedure call error (not procedure), the system variable ERRNO is set to
ERR_CALLPROC.
These errors can be handled in the error handler.
Syntax
CallByVar
[Name ':='] <expression ( IN ) of string>','
[Number ':='] <expression ( IN ) of num>';'
Related information
For information about
See
Calling procedures
Technical reference manual - RAPID overview
Operating manual - IRC5 with FlexPendant
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 36
|
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
33
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.10. CallByVar - Call a procedure by a variable
Usage
CallByVar ( Call By Variable ) can be used to call procedures with specific names, e.g.
proc_name1, proc_name2, proc_name3 ... proc_namex via a variable.
Basic examples
A basic example of the instruction CallByVar is illustrated below.
See also More examples on page 33 .
Example 1
reg1 := 2;
CallByVar "proc", reg1;
The procedure proc2 is called.
Arguments
CallByVar Name Number
Name
Data type: string
The first part of the procedure name, e.g. proc_name .
Number
Data type: num
The numeric value for the number of the procedure. This value will be converted to a string
and gives the 2nd part of the procedure name, e.g. 1 . The value must be a positive integer.
More examples
More examples of how to make static and dynamic selection of procedure call.
Example 1 - Static selection of procedure call
TEST reg1
CASE 1:
lf_door door_loc;
CASE 2:
rf_door door_loc;
CASE 3:
lr_door door_loc;
CASE 4:
rr_door door_loc;
DEFAULT:
EXIT;
ENDTEST
Depending on whether the value of register reg1 is 1, 2, 3, or 4, different procedures are
called that perform the appropriate type of work for the selected door. The door location in
argument door_loc .
Continues on next page
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
3HAC 16581-1 Revision: J
34
© Copyright 2004-2010 ABB. All rights reserved.
Example 2 - Dynamic selection of procedure call with RAPID syntax
reg1 := 2;
%"proc"+NumToStr(reg1,0)% door_loc;
The procedure proc2 is called with argument door_loc .
Limitation: All procedures must have a specific name e.g. proc1, proc2, proc3.
Example 3 - Dynamic selection of procedure call with CallByVar
reg1 := 2;
CallByVar "proc",reg1;
The procedure proc2 is called.
Limitation: All procedures must have specific name, e.g. proc1 , proc2 , proc3 , and no
arguments can be used.
Limitations
Can only be used to call procedures without parameters.
Can not be used to call LOCAL procedures.
Execution of CallByVar takes a little more time than execution of a normal procedure call.
Error handling
In the argument Number is < 0 or is not an integer, the system variable ERRNO is set to
ERR_ARGVALERR.
In reference to an unknown procedure, the system variable ERRNO is set to
ERR_REFUNKPRC.
In procedure call error (not procedure), the system variable ERRNO is set to
ERR_CALLPROC.
These errors can be handled in the error handler.
Syntax
CallByVar
[Name ':='] <expression ( IN ) of string>','
[Number ':='] <expression ( IN ) of num>';'
Related information
For information about
See
Calling procedures
Technical reference manual - RAPID overview
Operating manual - IRC5 with FlexPendant
Continued
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
35
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.11. CancelLoad - Cancel loading of a module
Usage
CancelLoad can be used to cancel the loading operation generated from the instruction
StartLoad .
CancelLoad can only be used between the instruction StartLoad and WaitLoad .
Basic examples
A basic example of the instruction CancelLoad is illustrated below.
See also More examples on page 35 .
Example1
CancelLoad load1;
The load session load1 is cancelled.
Arguments
CancelLoad LoadNo
LoadNo
Data type: loadsession
Reference to the load session, created by the instruction StartLoad .
More examples
More examples of how to use the instruction CancelLoad are illustrated below.
Example 1
VAR loadsession load1;
StartLoad "HOME:"\File:="PART_B.MOD",load1;
...
IF ...
CancelLoad load1;
StartLoad "HOME:"\File:="PART_C.MOD",load1;
ENDIF
...
WaitLoad load1;
The instruction CancelLoad will cancel the on-going loading of the module PART_B.MOD
and instead make it possible to load PART_C.MOD .
Error handling
If the variable specified in argument LoadNo is not in use, meaning that no load session is in
use, the system variable ERRNO is set to ERR_LOADNO_NOUSE. This error can then be
handled in the error handler.
Limitation
CancelLoad can only be used in the sequence after that instruction StartLoad is ready and
before instruction WaitLoad is started.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 37
|
1 Instructions
1.10. CallByVar - Call a procedure by a variable
RobotWare - OS
3HAC 16581-1 Revision: J
34
© Copyright 2004-2010 ABB. All rights reserved.
Example 2 - Dynamic selection of procedure call with RAPID syntax
reg1 := 2;
%"proc"+NumToStr(reg1,0)% door_loc;
The procedure proc2 is called with argument door_loc .
Limitation: All procedures must have a specific name e.g. proc1, proc2, proc3.
Example 3 - Dynamic selection of procedure call with CallByVar
reg1 := 2;
CallByVar "proc",reg1;
The procedure proc2 is called.
Limitation: All procedures must have specific name, e.g. proc1 , proc2 , proc3 , and no
arguments can be used.
Limitations
Can only be used to call procedures without parameters.
Can not be used to call LOCAL procedures.
Execution of CallByVar takes a little more time than execution of a normal procedure call.
Error handling
In the argument Number is < 0 or is not an integer, the system variable ERRNO is set to
ERR_ARGVALERR.
In reference to an unknown procedure, the system variable ERRNO is set to
ERR_REFUNKPRC.
In procedure call error (not procedure), the system variable ERRNO is set to
ERR_CALLPROC.
These errors can be handled in the error handler.
Syntax
CallByVar
[Name ':='] <expression ( IN ) of string>','
[Number ':='] <expression ( IN ) of num>';'
Related information
For information about
See
Calling procedures
Technical reference manual - RAPID overview
Operating manual - IRC5 with FlexPendant
Continued
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
35
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.11. CancelLoad - Cancel loading of a module
Usage
CancelLoad can be used to cancel the loading operation generated from the instruction
StartLoad .
CancelLoad can only be used between the instruction StartLoad and WaitLoad .
Basic examples
A basic example of the instruction CancelLoad is illustrated below.
See also More examples on page 35 .
Example1
CancelLoad load1;
The load session load1 is cancelled.
Arguments
CancelLoad LoadNo
LoadNo
Data type: loadsession
Reference to the load session, created by the instruction StartLoad .
More examples
More examples of how to use the instruction CancelLoad are illustrated below.
Example 1
VAR loadsession load1;
StartLoad "HOME:"\File:="PART_B.MOD",load1;
...
IF ...
CancelLoad load1;
StartLoad "HOME:"\File:="PART_C.MOD",load1;
ENDIF
...
WaitLoad load1;
The instruction CancelLoad will cancel the on-going loading of the module PART_B.MOD
and instead make it possible to load PART_C.MOD .
Error handling
If the variable specified in argument LoadNo is not in use, meaning that no load session is in
use, the system variable ERRNO is set to ERR_LOADNO_NOUSE. This error can then be
handled in the error handler.
Limitation
CancelLoad can only be used in the sequence after that instruction StartLoad is ready and
before instruction WaitLoad is started.
Continues on next page
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
3HAC 16581-1 Revision: J
36
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
CancelLoad
[ LoadNo ':=' ] < variable ( VAR ) of loadsession >';'
Related information
For information about
See
Load a program module during
execution
StartLoad - Load a program module during
execution on page 482
Connect the loaded module to the task
WaitLoad - Connect the loaded module to the task
on page 682
Load session
loadsession - Program load session on page 1138
Load a program module
Load - Load a program module during execution on
page 208
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Check program references
CheckProgRef - Check program references on
page 37
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 38
|
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
35
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.11. CancelLoad - Cancel loading of a module
Usage
CancelLoad can be used to cancel the loading operation generated from the instruction
StartLoad .
CancelLoad can only be used between the instruction StartLoad and WaitLoad .
Basic examples
A basic example of the instruction CancelLoad is illustrated below.
See also More examples on page 35 .
Example1
CancelLoad load1;
The load session load1 is cancelled.
Arguments
CancelLoad LoadNo
LoadNo
Data type: loadsession
Reference to the load session, created by the instruction StartLoad .
More examples
More examples of how to use the instruction CancelLoad are illustrated below.
Example 1
VAR loadsession load1;
StartLoad "HOME:"\File:="PART_B.MOD",load1;
...
IF ...
CancelLoad load1;
StartLoad "HOME:"\File:="PART_C.MOD",load1;
ENDIF
...
WaitLoad load1;
The instruction CancelLoad will cancel the on-going loading of the module PART_B.MOD
and instead make it possible to load PART_C.MOD .
Error handling
If the variable specified in argument LoadNo is not in use, meaning that no load session is in
use, the system variable ERRNO is set to ERR_LOADNO_NOUSE. This error can then be
handled in the error handler.
Limitation
CancelLoad can only be used in the sequence after that instruction StartLoad is ready and
before instruction WaitLoad is started.
Continues on next page
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
3HAC 16581-1 Revision: J
36
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
CancelLoad
[ LoadNo ':=' ] < variable ( VAR ) of loadsession >';'
Related information
For information about
See
Load a program module during
execution
StartLoad - Load a program module during
execution on page 482
Connect the loaded module to the task
WaitLoad - Connect the loaded module to the task
on page 682
Load session
loadsession - Program load session on page 1138
Load a program module
Load - Load a program module during execution on
page 208
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Check program references
CheckProgRef - Check program references on
page 37
Continued
1 Instructions
1.12. CheckProgRef - Check program references
RobotWare - OS
37
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.12. CheckProgRef - Check program references
Usage
CheckProgRef is used to check for unresolved references at any time during execution.
Basic examples
A basic example of the instruction CheckProgRef is illustrated below.
Example 1
Load \Dynamic, diskhome \File:="PART_B.MOD" \CheckRef;
Unload "PART_A.MOD";
CheckProgRef;
In this case the program contains a module called PART_A.MOD . A new module PART_B.MOD
is loaded, which checks if all references are OK. Then PART_A.MOD is unloaded. To check
for unresolved references after unload, a call to CheckProgRef is done.
Program execution
Program execution forces a new link of the program task and checks for unresolved
references.
If an error occurs during CheckProgRef , the program is not affected, it just tells you that an
unresolved reference exists in the program task. Therefore, use CheckProgRef immediately
after changing the number of modules in the program task (loading or unloading) to be able
to know which module caused the link error.
This instruction can also be used as a substitute for using the optional argument \CheckRef
in instruction Load or WaitLoad .
Error handling
If the program task contains unresolved references, the system variable ERRNO will be set
to ERR_LINKREF, which can be handled in the error handler.
Syntax
CheckProgRef';'
Related information
For information about
See
Load of a program module
Load - Load a program module during
execution on page 208
Unload of a program module
UnLoad - UnLoad a program module during
execution on page 655
Start loading of a program module
StartLoad - Load a program module during
execution on page 482
Finish loading of a program module
WaitLoad - Connect the loaded module to the
task on page 682
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 39
|
1 Instructions
1.11. CancelLoad - Cancel loading of a module
RobotWare - OS
3HAC 16581-1 Revision: J
36
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
CancelLoad
[ LoadNo ':=' ] < variable ( VAR ) of loadsession >';'
Related information
For information about
See
Load a program module during
execution
StartLoad - Load a program module during
execution on page 482
Connect the loaded module to the task
WaitLoad - Connect the loaded module to the task
on page 682
Load session
loadsession - Program load session on page 1138
Load a program module
Load - Load a program module during execution on
page 208
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Check program references
CheckProgRef - Check program references on
page 37
Continued
1 Instructions
1.12. CheckProgRef - Check program references
RobotWare - OS
37
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.12. CheckProgRef - Check program references
Usage
CheckProgRef is used to check for unresolved references at any time during execution.
Basic examples
A basic example of the instruction CheckProgRef is illustrated below.
Example 1
Load \Dynamic, diskhome \File:="PART_B.MOD" \CheckRef;
Unload "PART_A.MOD";
CheckProgRef;
In this case the program contains a module called PART_A.MOD . A new module PART_B.MOD
is loaded, which checks if all references are OK. Then PART_A.MOD is unloaded. To check
for unresolved references after unload, a call to CheckProgRef is done.
Program execution
Program execution forces a new link of the program task and checks for unresolved
references.
If an error occurs during CheckProgRef , the program is not affected, it just tells you that an
unresolved reference exists in the program task. Therefore, use CheckProgRef immediately
after changing the number of modules in the program task (loading or unloading) to be able
to know which module caused the link error.
This instruction can also be used as a substitute for using the optional argument \CheckRef
in instruction Load or WaitLoad .
Error handling
If the program task contains unresolved references, the system variable ERRNO will be set
to ERR_LINKREF, which can be handled in the error handler.
Syntax
CheckProgRef';'
Related information
For information about
See
Load of a program module
Load - Load a program module during
execution on page 208
Unload of a program module
UnLoad - UnLoad a program module during
execution on page 655
Start loading of a program module
StartLoad - Load a program module during
execution on page 482
Finish loading of a program module
WaitLoad - Connect the loaded module to the
task on page 682
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
38
© Copyright 2004-2010 ABB. All rights reserved.
1.13. CirPathMode - Tool reorientation during circle path
Usage
CirPathMode ( Circle Path Mode ) makes it possible to select different modes to reorientate
the tool during circular movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system in
Motion tasks.
Basic examples
Basic examples of the instruction CirPathMode are illustrated below.
Example 1
CirPathMode \PathFrame;
Standard mode for tool reorientation in the actual path frame from the start point to the
ToPoint during all succeeding circular movements. This is default in the system.
Example 2
CirPathMode \ObjectFrame;
Modified mode for tool reorientation in actual object frame from the start point to the
ToPoint during all succeeding circular movements.
Example 3
CirPathMode \CirPointOri;
Modified mode for tool reorientation from the start point via the programmed CirPoint
orientation to the ToPoint during all succeeding circular movements.
Example 4
CirPathMode \Wrist45;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 5 are used. This mode should only be used
for thin objects.
Example 5
CirPathMode \Wrist46;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 6 are used. This mode should only be used
for thin objects.
Example 6
CirPathMode \Wrist56;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 5 and 6 are used. This mode should only be used
for thin objects.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 40
|
1 Instructions
1.12. CheckProgRef - Check program references
RobotWare - OS
37
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.12. CheckProgRef - Check program references
Usage
CheckProgRef is used to check for unresolved references at any time during execution.
Basic examples
A basic example of the instruction CheckProgRef is illustrated below.
Example 1
Load \Dynamic, diskhome \File:="PART_B.MOD" \CheckRef;
Unload "PART_A.MOD";
CheckProgRef;
In this case the program contains a module called PART_A.MOD . A new module PART_B.MOD
is loaded, which checks if all references are OK. Then PART_A.MOD is unloaded. To check
for unresolved references after unload, a call to CheckProgRef is done.
Program execution
Program execution forces a new link of the program task and checks for unresolved
references.
If an error occurs during CheckProgRef , the program is not affected, it just tells you that an
unresolved reference exists in the program task. Therefore, use CheckProgRef immediately
after changing the number of modules in the program task (loading or unloading) to be able
to know which module caused the link error.
This instruction can also be used as a substitute for using the optional argument \CheckRef
in instruction Load or WaitLoad .
Error handling
If the program task contains unresolved references, the system variable ERRNO will be set
to ERR_LINKREF, which can be handled in the error handler.
Syntax
CheckProgRef';'
Related information
For information about
See
Load of a program module
Load - Load a program module during
execution on page 208
Unload of a program module
UnLoad - UnLoad a program module during
execution on page 655
Start loading of a program module
StartLoad - Load a program module during
execution on page 482
Finish loading of a program module
WaitLoad - Connect the loaded module to the
task on page 682
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
38
© Copyright 2004-2010 ABB. All rights reserved.
1.13. CirPathMode - Tool reorientation during circle path
Usage
CirPathMode ( Circle Path Mode ) makes it possible to select different modes to reorientate
the tool during circular movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system in
Motion tasks.
Basic examples
Basic examples of the instruction CirPathMode are illustrated below.
Example 1
CirPathMode \PathFrame;
Standard mode for tool reorientation in the actual path frame from the start point to the
ToPoint during all succeeding circular movements. This is default in the system.
Example 2
CirPathMode \ObjectFrame;
Modified mode for tool reorientation in actual object frame from the start point to the
ToPoint during all succeeding circular movements.
Example 3
CirPathMode \CirPointOri;
Modified mode for tool reorientation from the start point via the programmed CirPoint
orientation to the ToPoint during all succeeding circular movements.
Example 4
CirPathMode \Wrist45;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 5 are used. This mode should only be used
for thin objects.
Example 5
CirPathMode \Wrist46;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 6 are used. This mode should only be used
for thin objects.
Example 6
CirPathMode \Wrist56;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 5 and 6 are used. This mode should only be used
for thin objects.
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
39
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Description
PathFrame
The figure in the table shows the tool reorientation for the standard mode \PathFrame .
The figure in the table shows the use of standard mode \PathFrame with fixed tool orienta-
tion.
Illustration
Description
xx0500002152
The arrows shows the tool from wrist center
point to tool center point for the programmed
points. The path for the wrist center point is
dotted in the figure.
The \PathFrame mode makes it easy to get
the same angle of the tool around the
cylinder. The robot wrist will not go through
the programmed orientation in the
CirPoint
Illustration
Description
xx0500002153
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \PathFrame mode.
Compare with the figure below when
\ObjectFrame mode is used.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 41
|
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
38
© Copyright 2004-2010 ABB. All rights reserved.
1.13. CirPathMode - Tool reorientation during circle path
Usage
CirPathMode ( Circle Path Mode ) makes it possible to select different modes to reorientate
the tool during circular movements.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system in
Motion tasks.
Basic examples
Basic examples of the instruction CirPathMode are illustrated below.
Example 1
CirPathMode \PathFrame;
Standard mode for tool reorientation in the actual path frame from the start point to the
ToPoint during all succeeding circular movements. This is default in the system.
Example 2
CirPathMode \ObjectFrame;
Modified mode for tool reorientation in actual object frame from the start point to the
ToPoint during all succeeding circular movements.
Example 3
CirPathMode \CirPointOri;
Modified mode for tool reorientation from the start point via the programmed CirPoint
orientation to the ToPoint during all succeeding circular movements.
Example 4
CirPathMode \Wrist45;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 5 are used. This mode should only be used
for thin objects.
Example 5
CirPathMode \Wrist46;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 4 and 6 are used. This mode should only be used
for thin objects.
Example 6
CirPathMode \Wrist56;
Modified mode such that the projection of the tool’s z-axis onto the cut plane will follow the
programmed circle segment. Only wrist axes 5 and 6 are used. This mode should only be used
for thin objects.
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
39
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Description
PathFrame
The figure in the table shows the tool reorientation for the standard mode \PathFrame .
The figure in the table shows the use of standard mode \PathFrame with fixed tool orienta-
tion.
Illustration
Description
xx0500002152
The arrows shows the tool from wrist center
point to tool center point for the programmed
points. The path for the wrist center point is
dotted in the figure.
The \PathFrame mode makes it easy to get
the same angle of the tool around the
cylinder. The robot wrist will not go through
the programmed orientation in the
CirPoint
Illustration
Description
xx0500002153
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \PathFrame mode.
Compare with the figure below when
\ObjectFrame mode is used.
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
40
© Copyright 2004-2010 ABB. All rights reserved.
ObjectFrame
The figure in the table shows the use of modified mode \ObjectFrame with fixed tool ori-
entation.
CirPointOri
The figure in the table shows the different tool reorientation between the standard mode
\PathFrame and the modified mode \CirPointOri .
Wrist45 / Wrist46 / Wrist56
The figure in the table shows the frames involved when cutting a shape using axes 4 and 5..
Illustration
Description
xx0500002151
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \ObjectFrame mode.
This mode will make a linear reorientation of the
tool in the same way as for MoveL . The robot wrist
will not go through the programmed orientation in
the CirPoint .
Compare with the figure above when
\PathFrame mode is used.
Illustration
Description
xx0500002150
The arrows show the tool from wrist center point
to tool center point for the programmed points.
The different paths for the wrist center point are
dashed in the figure.
The \CirPointOri mode will make the robot
wrist to go through the programmed orientation
in the CirPoint .
Illustration
Description
xx0800000294
It is assumed that the cutting beam is aligned
with the tool’s z axis. The coordinate frame of the
cut plane is defined by the robot’s starting
position when executing the MoveC instruction.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 42
|
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
39
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Description
PathFrame
The figure in the table shows the tool reorientation for the standard mode \PathFrame .
The figure in the table shows the use of standard mode \PathFrame with fixed tool orienta-
tion.
Illustration
Description
xx0500002152
The arrows shows the tool from wrist center
point to tool center point for the programmed
points. The path for the wrist center point is
dotted in the figure.
The \PathFrame mode makes it easy to get
the same angle of the tool around the
cylinder. The robot wrist will not go through
the programmed orientation in the
CirPoint
Illustration
Description
xx0500002153
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \PathFrame mode.
Compare with the figure below when
\ObjectFrame mode is used.
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
40
© Copyright 2004-2010 ABB. All rights reserved.
ObjectFrame
The figure in the table shows the use of modified mode \ObjectFrame with fixed tool ori-
entation.
CirPointOri
The figure in the table shows the different tool reorientation between the standard mode
\PathFrame and the modified mode \CirPointOri .
Wrist45 / Wrist46 / Wrist56
The figure in the table shows the frames involved when cutting a shape using axes 4 and 5..
Illustration
Description
xx0500002151
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \ObjectFrame mode.
This mode will make a linear reorientation of the
tool in the same way as for MoveL . The robot wrist
will not go through the programmed orientation in
the CirPoint .
Compare with the figure above when
\PathFrame mode is used.
Illustration
Description
xx0500002150
The arrows show the tool from wrist center point
to tool center point for the programmed points.
The different paths for the wrist center point are
dashed in the figure.
The \CirPointOri mode will make the robot
wrist to go through the programmed orientation
in the CirPoint .
Illustration
Description
xx0800000294
It is assumed that the cutting beam is aligned
with the tool’s z axis. The coordinate frame of the
cut plane is defined by the robot’s starting
position when executing the MoveC instruction.
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
41
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
CirPathMode [\PathFrame] | [\ObjectFrame] | [\CirPointOri] |
[\Wrist45] | [\Wrist46] | [\Wrist56]
[ \PathFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual path frame. This is the standard
mode in the system.
[ \ObjectFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual object frame.
[ \CirPointOri ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the programmed CirPoint orientation and further to the ToPoint
orientation.
[ \Wrist45 ]
Data type: switch
The robot will move axes 4 and 5 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist46 ]
Data type: switch
The robot will move axes 4 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist56 ]
Data type: switch
The robot will move axes 5 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
If you use CirPathMode without any switch then result is the same as CirPointMode
\PathFrame
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 43
|
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
40
© Copyright 2004-2010 ABB. All rights reserved.
ObjectFrame
The figure in the table shows the use of modified mode \ObjectFrame with fixed tool ori-
entation.
CirPointOri
The figure in the table shows the different tool reorientation between the standard mode
\PathFrame and the modified mode \CirPointOri .
Wrist45 / Wrist46 / Wrist56
The figure in the table shows the frames involved when cutting a shape using axes 4 and 5..
Illustration
Description
xx0500002151
This picture shows the obtained orientation of the
tool in the middle of the circle using a leaning tool
and \ObjectFrame mode.
This mode will make a linear reorientation of the
tool in the same way as for MoveL . The robot wrist
will not go through the programmed orientation in
the CirPoint .
Compare with the figure above when
\PathFrame mode is used.
Illustration
Description
xx0500002150
The arrows show the tool from wrist center point
to tool center point for the programmed points.
The different paths for the wrist center point are
dashed in the figure.
The \CirPointOri mode will make the robot
wrist to go through the programmed orientation
in the CirPoint .
Illustration
Description
xx0800000294
It is assumed that the cutting beam is aligned
with the tool’s z axis. The coordinate frame of the
cut plane is defined by the robot’s starting
position when executing the MoveC instruction.
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
41
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
CirPathMode [\PathFrame] | [\ObjectFrame] | [\CirPointOri] |
[\Wrist45] | [\Wrist46] | [\Wrist56]
[ \PathFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual path frame. This is the standard
mode in the system.
[ \ObjectFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual object frame.
[ \CirPointOri ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the programmed CirPoint orientation and further to the ToPoint
orientation.
[ \Wrist45 ]
Data type: switch
The robot will move axes 4 and 5 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist46 ]
Data type: switch
The robot will move axes 4 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist56 ]
Data type: switch
The robot will move axes 5 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
If you use CirPathMode without any switch then result is the same as CirPointMode
\PathFrame
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
42
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The specified circular tool reorientation mode applies for the next executed robot circular
movements of any type ( MoveC, SearchC, TriggC, MoveCDO, MoveCSync, ArcC,
PaintC ... ) and is valid until a new CirPathMode (or obsolete CirPathReori ) instruction
is executed.
The standard circular reorientation mode ( CirPathMode \PathFrame ) is automatically set
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Limitations
The instruction only affects circular movements.
When using the \CirPointOri mode, the CirPoint must be between the points A and B
according to the figure below to make the circle movement to go through the programmed
orientation in the CirPoint .
xx0500002149
\Wrist45 , \Wrist46 , and \Wrist56 mode should only be used for cutting thin objects as
the ability to control the angle of the tool is lost when using only two wrist axes. Coordinated
movements are not possible since the main axis is locked.
If working in wrist singularity area and the instruction SingArea\Wrist has been executed,
the instruction CirPathMode has no effect because the system then selects another tool
reorientation mode for circular movements (joint interpolation).
This instruction replaces the old instruction CirPathReori (will work even in the future but
will not be documented any more).
Syntax
CirPathMode
['\'PathFrame] | ['\'ObjectFrame] | ['\'CirPointOri] |
['\'Wrist45] | ['\'Wrist46] | ['\'Wrist56] ';'
Related information
For information about
See
Interpolation
Technical reference manual - RAPID overview
Motion settings data
motsetdata - Motion settings data on page 1141
Circular move instruction
MoveC - Moves the robot circularly on page 236
Wrist movements
Application manual - Motion Performance ,
section Wrist Move
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 44
|
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
41
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
CirPathMode [\PathFrame] | [\ObjectFrame] | [\CirPointOri] |
[\Wrist45] | [\Wrist46] | [\Wrist56]
[ \PathFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual path frame. This is the standard
mode in the system.
[ \ObjectFrame ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the ToPoint orientation in the actual object frame.
[ \CirPointOri ]
Data type: switch
During the circular movement the reorientation of the tool is done continuously from the start
point orientation to the programmed CirPoint orientation and further to the ToPoint
orientation.
[ \Wrist45 ]
Data type: switch
The robot will move axes 4 and 5 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist46 ]
Data type: switch
The robot will move axes 4 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
[ \Wrist56 ]
Data type: switch
The robot will move axes 5 and 6 such that the projection of the tool’s z-axis onto the cut
plane will follow the programmed circle segment. This mode should only be used for thin
objects as only 2 wrist axes are used and thus give us increased accuracy but also less control.
NOTE: This switch requires option Wrist Move.
If you use CirPathMode without any switch then result is the same as CirPointMode
\PathFrame
Continued
Continues on next page
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
42
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The specified circular tool reorientation mode applies for the next executed robot circular
movements of any type ( MoveC, SearchC, TriggC, MoveCDO, MoveCSync, ArcC,
PaintC ... ) and is valid until a new CirPathMode (or obsolete CirPathReori ) instruction
is executed.
The standard circular reorientation mode ( CirPathMode \PathFrame ) is automatically set
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Limitations
The instruction only affects circular movements.
When using the \CirPointOri mode, the CirPoint must be between the points A and B
according to the figure below to make the circle movement to go through the programmed
orientation in the CirPoint .
xx0500002149
\Wrist45 , \Wrist46 , and \Wrist56 mode should only be used for cutting thin objects as
the ability to control the angle of the tool is lost when using only two wrist axes. Coordinated
movements are not possible since the main axis is locked.
If working in wrist singularity area and the instruction SingArea\Wrist has been executed,
the instruction CirPathMode has no effect because the system then selects another tool
reorientation mode for circular movements (joint interpolation).
This instruction replaces the old instruction CirPathReori (will work even in the future but
will not be documented any more).
Syntax
CirPathMode
['\'PathFrame] | ['\'ObjectFrame] | ['\'CirPointOri] |
['\'Wrist45] | ['\'Wrist46] | ['\'Wrist56] ';'
Related information
For information about
See
Interpolation
Technical reference manual - RAPID overview
Motion settings data
motsetdata - Motion settings data on page 1141
Circular move instruction
MoveC - Moves the robot circularly on page 236
Wrist movements
Application manual - Motion Performance ,
section Wrist Move
Continued
1 Instructions
1.14. Clear - Clears the value
RobotWare - OS
43
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.14. Clear - Clears the value
Usage
Clear is used to clear a numeric variable or persistent , i.e. set it to 0.
Basic examples
Basic examples of the instruction Clear are illustrated below.
Example 1
Clear reg1;
Reg1 is cleared, i.e. reg1:=0 .
Example 2
CVAR dnum mydnum:=5;
Clear mydnum;
mydnum is cleared, i.e. mydnum:=0 .
Arguments
Clear Name | Dname
Name
Data type: num
The name of the variable or persistent to be cleared.
Dname
Data type: dnum
The name of the variable or persistent to be cleared.
Syntax
Clear
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum > ';'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Adding any value to a variable
Add - Adds a numeric value on page 19
Changing data using arbitrary
":=" - Assigns a value on page 24
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 45
|
1 Instructions
1.13. CirPathMode - Tool reorientation during circle path
RobotWare - OS
3HAC 16581-1 Revision: J
42
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The specified circular tool reorientation mode applies for the next executed robot circular
movements of any type ( MoveC, SearchC, TriggC, MoveCDO, MoveCSync, ArcC,
PaintC ... ) and is valid until a new CirPathMode (or obsolete CirPathReori ) instruction
is executed.
The standard circular reorientation mode ( CirPathMode \PathFrame ) is automatically set
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Limitations
The instruction only affects circular movements.
When using the \CirPointOri mode, the CirPoint must be between the points A and B
according to the figure below to make the circle movement to go through the programmed
orientation in the CirPoint .
xx0500002149
\Wrist45 , \Wrist46 , and \Wrist56 mode should only be used for cutting thin objects as
the ability to control the angle of the tool is lost when using only two wrist axes. Coordinated
movements are not possible since the main axis is locked.
If working in wrist singularity area and the instruction SingArea\Wrist has been executed,
the instruction CirPathMode has no effect because the system then selects another tool
reorientation mode for circular movements (joint interpolation).
This instruction replaces the old instruction CirPathReori (will work even in the future but
will not be documented any more).
Syntax
CirPathMode
['\'PathFrame] | ['\'ObjectFrame] | ['\'CirPointOri] |
['\'Wrist45] | ['\'Wrist46] | ['\'Wrist56] ';'
Related information
For information about
See
Interpolation
Technical reference manual - RAPID overview
Motion settings data
motsetdata - Motion settings data on page 1141
Circular move instruction
MoveC - Moves the robot circularly on page 236
Wrist movements
Application manual - Motion Performance ,
section Wrist Move
Continued
1 Instructions
1.14. Clear - Clears the value
RobotWare - OS
43
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.14. Clear - Clears the value
Usage
Clear is used to clear a numeric variable or persistent , i.e. set it to 0.
Basic examples
Basic examples of the instruction Clear are illustrated below.
Example 1
Clear reg1;
Reg1 is cleared, i.e. reg1:=0 .
Example 2
CVAR dnum mydnum:=5;
Clear mydnum;
mydnum is cleared, i.e. mydnum:=0 .
Arguments
Clear Name | Dname
Name
Data type: num
The name of the variable or persistent to be cleared.
Dname
Data type: dnum
The name of the variable or persistent to be cleared.
Syntax
Clear
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum > ';'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Adding any value to a variable
Add - Adds a numeric value on page 19
Changing data using arbitrary
":=" - Assigns a value on page 24
1 Instructions
1.15. ClearIOBuff - Clear input buffer of a serial channel
RobotWare - OS
3HAC 16581-1 Revision: J
44
© Copyright 2004-2010 ABB. All rights reserved.
1.15. ClearIOBuff - Clear input buffer of a serial channel
Usage
ClearIOBuff ( Clear I/O Buffer ) is used to clear the input buffer of a serial channel. All
buffered characters from the input serial channel are discarded.
Basic examples
A basic example of the instruction ClearIOBuff is illustrated below.
Example 1
VAR iodev channel2;
...
Open "com2:", channel2 \Bin;
ClearIOBuff channel2;
WaitTime 0.1;
The input buffer for the serial channel referred to by channel2 is cleared. The wait time
guarantees the clear operation enough time to finish.
Arguments
ClearIOBuff IODevice
IODevice
Data type: iodev
The name (reference) of the serial channel whose input buffer is to be cleared.
Program execution
All buffered characters from the input serial channel are discarded. Next read instructions will
wait for new input from the channel.
Limitations
This instruction can only be used for serial channels. Do not wait for acknowledgement of the
operation to finish. Allow a wait time 0.1 after the instruction is recommended to give the
operation enough time in every application.
Error handling
If trying to use the instruction on a file, the system variable ERRNO is set to ERR_FILEACC .
This error can then be handled in the error handler.
Syntax
ClearIOBuff
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a serial channel
Technical reference manual - RAPID overview
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 46
|
1 Instructions
1.14. Clear - Clears the value
RobotWare - OS
43
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.14. Clear - Clears the value
Usage
Clear is used to clear a numeric variable or persistent , i.e. set it to 0.
Basic examples
Basic examples of the instruction Clear are illustrated below.
Example 1
Clear reg1;
Reg1 is cleared, i.e. reg1:=0 .
Example 2
CVAR dnum mydnum:=5;
Clear mydnum;
mydnum is cleared, i.e. mydnum:=0 .
Arguments
Clear Name | Dname
Name
Data type: num
The name of the variable or persistent to be cleared.
Dname
Data type: dnum
The name of the variable or persistent to be cleared.
Syntax
Clear
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum > ';'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Decrementing a variable by 1
Decr - Decrements by 1 on page 81
Adding any value to a variable
Add - Adds a numeric value on page 19
Changing data using arbitrary
":=" - Assigns a value on page 24
1 Instructions
1.15. ClearIOBuff - Clear input buffer of a serial channel
RobotWare - OS
3HAC 16581-1 Revision: J
44
© Copyright 2004-2010 ABB. All rights reserved.
1.15. ClearIOBuff - Clear input buffer of a serial channel
Usage
ClearIOBuff ( Clear I/O Buffer ) is used to clear the input buffer of a serial channel. All
buffered characters from the input serial channel are discarded.
Basic examples
A basic example of the instruction ClearIOBuff is illustrated below.
Example 1
VAR iodev channel2;
...
Open "com2:", channel2 \Bin;
ClearIOBuff channel2;
WaitTime 0.1;
The input buffer for the serial channel referred to by channel2 is cleared. The wait time
guarantees the clear operation enough time to finish.
Arguments
ClearIOBuff IODevice
IODevice
Data type: iodev
The name (reference) of the serial channel whose input buffer is to be cleared.
Program execution
All buffered characters from the input serial channel are discarded. Next read instructions will
wait for new input from the channel.
Limitations
This instruction can only be used for serial channels. Do not wait for acknowledgement of the
operation to finish. Allow a wait time 0.1 after the instruction is recommended to give the
operation enough time in every application.
Error handling
If trying to use the instruction on a file, the system variable ERRNO is set to ERR_FILEACC .
This error can then be handled in the error handler.
Syntax
ClearIOBuff
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a serial channel
Technical reference manual - RAPID overview
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
45
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.16. ClearPath - Clear current path
Usage
ClearPath ( Clear Path ) clears the whole motion path on the current motion path level (base
level or StorePath level).
With motion path, meaning all the movement segments from any move instructions which
have been executed in RAPID but not performed by the robot at the execution time of
ClearPath .
The robot must be in a stop point position or must be stopped with StopMove before the
instruction ClearPath can be executed.
Basic examples
Basic examples of the instruction ClearPath are illustrated below.
xx0500002154
In the following program example, the robot moves from the position home to the position
p1 . At the point px the signal di1 will indicate that the payload has been dropped. The
execution continues in the trap routine gohome . The robot will stop moving (start the braking)
at px , the path will be cleared, the robot will move to position home . The error will be raised
up to the calling routine minicycle and the whole user defined program cycle proc1 ..
proc2 will be executed from the beginning one more time.
Example 1
VAR intnum drop_payload;
VAR errnum ERR_DROP_LOAD := -1;
PROC minicycle()
BookErrNo ERR_DROP_LOAD;
proc1;
...
ERROR (ERR_DROP_LOAD)
RETRY;
ENDPROC
PROC proc1()
...
proc2;
...
ENDPROC
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 47
|
1 Instructions
1.15. ClearIOBuff - Clear input buffer of a serial channel
RobotWare - OS
3HAC 16581-1 Revision: J
44
© Copyright 2004-2010 ABB. All rights reserved.
1.15. ClearIOBuff - Clear input buffer of a serial channel
Usage
ClearIOBuff ( Clear I/O Buffer ) is used to clear the input buffer of a serial channel. All
buffered characters from the input serial channel are discarded.
Basic examples
A basic example of the instruction ClearIOBuff is illustrated below.
Example 1
VAR iodev channel2;
...
Open "com2:", channel2 \Bin;
ClearIOBuff channel2;
WaitTime 0.1;
The input buffer for the serial channel referred to by channel2 is cleared. The wait time
guarantees the clear operation enough time to finish.
Arguments
ClearIOBuff IODevice
IODevice
Data type: iodev
The name (reference) of the serial channel whose input buffer is to be cleared.
Program execution
All buffered characters from the input serial channel are discarded. Next read instructions will
wait for new input from the channel.
Limitations
This instruction can only be used for serial channels. Do not wait for acknowledgement of the
operation to finish. Allow a wait time 0.1 after the instruction is recommended to give the
operation enough time in every application.
Error handling
If trying to use the instruction on a file, the system variable ERRNO is set to ERR_FILEACC .
This error can then be handled in the error handler.
Syntax
ClearIOBuff
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a serial channel
Technical reference manual - RAPID overview
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
45
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.16. ClearPath - Clear current path
Usage
ClearPath ( Clear Path ) clears the whole motion path on the current motion path level (base
level or StorePath level).
With motion path, meaning all the movement segments from any move instructions which
have been executed in RAPID but not performed by the robot at the execution time of
ClearPath .
The robot must be in a stop point position or must be stopped with StopMove before the
instruction ClearPath can be executed.
Basic examples
Basic examples of the instruction ClearPath are illustrated below.
xx0500002154
In the following program example, the robot moves from the position home to the position
p1 . At the point px the signal di1 will indicate that the payload has been dropped. The
execution continues in the trap routine gohome . The robot will stop moving (start the braking)
at px , the path will be cleared, the robot will move to position home . The error will be raised
up to the calling routine minicycle and the whole user defined program cycle proc1 ..
proc2 will be executed from the beginning one more time.
Example 1
VAR intnum drop_payload;
VAR errnum ERR_DROP_LOAD := -1;
PROC minicycle()
BookErrNo ERR_DROP_LOAD;
proc1;
...
ERROR (ERR_DROP_LOAD)
RETRY;
ENDPROC
PROC proc1()
...
proc2;
...
ENDPROC
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
46
© Copyright 2004-2010 ABB. All rights reserved.
PROC proc2()
CONNECT drop_payload WITH gohome;
ISignalDI \Single, di1, 1, drop_payload;
MoveL p1, v500, fine, gripper;
...........
IDelete drop_payload
ENDPROC
TRAP gohome
StopMove \Quick;
ClearPath;
IDelete drop_payload;
StorePath;
MoveL home, v500, fine, gripper;
RestoPath;
RAISE ERR_DROP_LOAD;
ERROR
RAISE;
ENDTRAP
If the same program is being run but without StopMove and ClearPath in the trap routine
gohome , the robot will continue to position p1 before going back to position home .
If programming MoveL home with flying-point (zone) instead of stop-point ( fine ), the
movement is going on during the RAISE to the error handler in procedure minicycle and
further until the movement is ready.
Limitations
Limitation examples of the instruction ClearPath are illustrated below.
Example 1 - Limitation
VAR intnum int_move_stop;
...
PROC test_move_stop()
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ENDPROC
TRAP trap_move_stop
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
ENDTRAP
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 48
|
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
45
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.16. ClearPath - Clear current path
Usage
ClearPath ( Clear Path ) clears the whole motion path on the current motion path level (base
level or StorePath level).
With motion path, meaning all the movement segments from any move instructions which
have been executed in RAPID but not performed by the robot at the execution time of
ClearPath .
The robot must be in a stop point position or must be stopped with StopMove before the
instruction ClearPath can be executed.
Basic examples
Basic examples of the instruction ClearPath are illustrated below.
xx0500002154
In the following program example, the robot moves from the position home to the position
p1 . At the point px the signal di1 will indicate that the payload has been dropped. The
execution continues in the trap routine gohome . The robot will stop moving (start the braking)
at px , the path will be cleared, the robot will move to position home . The error will be raised
up to the calling routine minicycle and the whole user defined program cycle proc1 ..
proc2 will be executed from the beginning one more time.
Example 1
VAR intnum drop_payload;
VAR errnum ERR_DROP_LOAD := -1;
PROC minicycle()
BookErrNo ERR_DROP_LOAD;
proc1;
...
ERROR (ERR_DROP_LOAD)
RETRY;
ENDPROC
PROC proc1()
...
proc2;
...
ENDPROC
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
46
© Copyright 2004-2010 ABB. All rights reserved.
PROC proc2()
CONNECT drop_payload WITH gohome;
ISignalDI \Single, di1, 1, drop_payload;
MoveL p1, v500, fine, gripper;
...........
IDelete drop_payload
ENDPROC
TRAP gohome
StopMove \Quick;
ClearPath;
IDelete drop_payload;
StorePath;
MoveL home, v500, fine, gripper;
RestoPath;
RAISE ERR_DROP_LOAD;
ERROR
RAISE;
ENDTRAP
If the same program is being run but without StopMove and ClearPath in the trap routine
gohome , the robot will continue to position p1 before going back to position home .
If programming MoveL home with flying-point (zone) instead of stop-point ( fine ), the
movement is going on during the RAISE to the error handler in procedure minicycle and
further until the movement is ready.
Limitations
Limitation examples of the instruction ClearPath are illustrated below.
Example 1 - Limitation
VAR intnum int_move_stop;
...
PROC test_move_stop()
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ENDPROC
TRAP trap_move_stop
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
ENDTRAP
Continued
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
47
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
This is an example of ClearPath limitation. During the robot movement to p10 and p20 ,
the ongoing movement is stopped and the motion path is cleared, but no action is done to
break off the active instruction MoveJ p10 or MoveL p20 in the PROC test_move_stop .
So the ongoing movement will be interrupted and the robot will go to p10 in the TRAP
trap_move_stop , but no further movement to p10 or p20 in the PROC test_move_stop
will be done. The program execution will be hanging.
This problem can be solved with either error recovery with long jump as described in example
2 below or with asynchronously raised error with instruction ProcerrRecovery .
Example 2 - No limitations
VAR intnum int_move_stop;
VAR errnum err_move_stop := -1;
...
PROC test_move_stop()
BookErrNo err_move_stop;
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ERROR (err_move_stop)
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
RETRY;
ENDPROC
TRAP trap_move_stop
RAISE err_move_stop;
ERROR
RAISE;
ENDTRAP
This is an example of how to use error recovery with long jump together with ClearPath
without any limitation. During the robot movement to p10 and p20 , the ongoing movement
is stopped. The motion path is cleared, and because of error recovery through execution level
boundaries, break off is done of the active instruction MoveJ p10 or MoveL p20 . So the
ongoing movement will be interrupted and the robot will go to p10 in the ERROR handler ,
and once more execute the interrupted instruction MoveJ p10 or MoveL p20 in the PROC
test_move_stop .
Syntax
ClearPath ';'
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 49
|
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
46
© Copyright 2004-2010 ABB. All rights reserved.
PROC proc2()
CONNECT drop_payload WITH gohome;
ISignalDI \Single, di1, 1, drop_payload;
MoveL p1, v500, fine, gripper;
...........
IDelete drop_payload
ENDPROC
TRAP gohome
StopMove \Quick;
ClearPath;
IDelete drop_payload;
StorePath;
MoveL home, v500, fine, gripper;
RestoPath;
RAISE ERR_DROP_LOAD;
ERROR
RAISE;
ENDTRAP
If the same program is being run but without StopMove and ClearPath in the trap routine
gohome , the robot will continue to position p1 before going back to position home .
If programming MoveL home with flying-point (zone) instead of stop-point ( fine ), the
movement is going on during the RAISE to the error handler in procedure minicycle and
further until the movement is ready.
Limitations
Limitation examples of the instruction ClearPath are illustrated below.
Example 1 - Limitation
VAR intnum int_move_stop;
...
PROC test_move_stop()
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ENDPROC
TRAP trap_move_stop
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
ENDTRAP
Continued
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
47
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
This is an example of ClearPath limitation. During the robot movement to p10 and p20 ,
the ongoing movement is stopped and the motion path is cleared, but no action is done to
break off the active instruction MoveJ p10 or MoveL p20 in the PROC test_move_stop .
So the ongoing movement will be interrupted and the robot will go to p10 in the TRAP
trap_move_stop , but no further movement to p10 or p20 in the PROC test_move_stop
will be done. The program execution will be hanging.
This problem can be solved with either error recovery with long jump as described in example
2 below or with asynchronously raised error with instruction ProcerrRecovery .
Example 2 - No limitations
VAR intnum int_move_stop;
VAR errnum err_move_stop := -1;
...
PROC test_move_stop()
BookErrNo err_move_stop;
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ERROR (err_move_stop)
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
RETRY;
ENDPROC
TRAP trap_move_stop
RAISE err_move_stop;
ERROR
RAISE;
ENDTRAP
This is an example of how to use error recovery with long jump together with ClearPath
without any limitation. During the robot movement to p10 and p20 , the ongoing movement
is stopped. The motion path is cleared, and because of error recovery through execution level
boundaries, break off is done of the active instruction MoveJ p10 or MoveL p20 . So the
ongoing movement will be interrupted and the robot will go to p10 in the ERROR handler ,
and once more execute the interrupted instruction MoveJ p10 or MoveL p20 in the PROC
test_move_stop .
Syntax
ClearPath ';'
Continued
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
48
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Stop robot movements
StopMove - Stops robot movement on page 515
Error recovery
Technical reference manual - RAPID overview
Technical reference manual - RAPID kernel
Asynchronously raised error
ProcerrRecovery - Generate and recover from process-move
error on page 325
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 50
|
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
47
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
This is an example of ClearPath limitation. During the robot movement to p10 and p20 ,
the ongoing movement is stopped and the motion path is cleared, but no action is done to
break off the active instruction MoveJ p10 or MoveL p20 in the PROC test_move_stop .
So the ongoing movement will be interrupted and the robot will go to p10 in the TRAP
trap_move_stop , but no further movement to p10 or p20 in the PROC test_move_stop
will be done. The program execution will be hanging.
This problem can be solved with either error recovery with long jump as described in example
2 below or with asynchronously raised error with instruction ProcerrRecovery .
Example 2 - No limitations
VAR intnum int_move_stop;
VAR errnum err_move_stop := -1;
...
PROC test_move_stop()
BookErrNo err_move_stop;
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ERROR (err_move_stop)
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;
RestoPath;
RETRY;
ENDPROC
TRAP trap_move_stop
RAISE err_move_stop;
ERROR
RAISE;
ENDTRAP
This is an example of how to use error recovery with long jump together with ClearPath
without any limitation. During the robot movement to p10 and p20 , the ongoing movement
is stopped. The motion path is cleared, and because of error recovery through execution level
boundaries, break off is done of the active instruction MoveJ p10 or MoveL p20 . So the
ongoing movement will be interrupted and the robot will go to p10 in the ERROR handler ,
and once more execute the interrupted instruction MoveJ p10 or MoveL p20 in the PROC
test_move_stop .
Syntax
ClearPath ';'
Continued
Continues on next page
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
48
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Stop robot movements
StopMove - Stops robot movement on page 515
Error recovery
Technical reference manual - RAPID overview
Technical reference manual - RAPID kernel
Asynchronously raised error
ProcerrRecovery - Generate and recover from process-move
error on page 325
Continued
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
49
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.17. ClearRawBytes - Clear the contents of rawbytes data
Usage
ClearRawBytes is used to set all the contents of a rawbytes variable to 0.
Basic examples
A basic example of the instruction is illustrated below.
Example 1
VAR rawbytes raw_data;
VAR num integer := 8
VAR num float := 13.4;
PackRawBytes integer, raw_data, 1 \IntX := DINT;
PackRawBytes float, raw_data, (RawBytesLen(raw_data)+1) \Float4;
ClearRawBytes raw_data \FromIndex := 5;
In the first 4 bytes the value of integer is placed (from index 1) and in the next 4 bytes
starting from index 5 the value of float .
The last instruction in the example clears the contents of raw_data , starting at index 5, i.e.
float will be cleared, but integer is kept in raw_data . Current length of valid bytes in
raw_data is set to 4.
Arguments
ClearRawBytes RawData [ \FromIndex ]
RawData
Data type: rawbytes
RawData is the data container which will be cleared.
[ \FromIndex ]
Data type: num
With \FromIndex it is specified where to start clearing the contents of RawData . Everything
is cleared to the end.
If \FromIndex is not specified, all data starting at index 1 is cleared.
Program execution
Data from index 1 (default) or from \FromIndex in the specified variable is reset to 0.
The current length of valid bytes in the specified variable is set to 0 (default) or to
( FromIndex - 1) if \FromIndex is programmed.
Syntax
ClearRawBytes
[RawData ':=' ] < variable ( VAR ) of rawbytes>
['\'FromIndex ':=' <expression ( IN ) of num>]';'
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 51
|
1 Instructions
1.16. ClearPath - Clear current path
Robot Ware - OS
3HAC 16581-1 Revision: J
48
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Stop robot movements
StopMove - Stops robot movement on page 515
Error recovery
Technical reference manual - RAPID overview
Technical reference manual - RAPID kernel
Asynchronously raised error
ProcerrRecovery - Generate and recover from process-move
error on page 325
Continued
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
49
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.17. ClearRawBytes - Clear the contents of rawbytes data
Usage
ClearRawBytes is used to set all the contents of a rawbytes variable to 0.
Basic examples
A basic example of the instruction is illustrated below.
Example 1
VAR rawbytes raw_data;
VAR num integer := 8
VAR num float := 13.4;
PackRawBytes integer, raw_data, 1 \IntX := DINT;
PackRawBytes float, raw_data, (RawBytesLen(raw_data)+1) \Float4;
ClearRawBytes raw_data \FromIndex := 5;
In the first 4 bytes the value of integer is placed (from index 1) and in the next 4 bytes
starting from index 5 the value of float .
The last instruction in the example clears the contents of raw_data , starting at index 5, i.e.
float will be cleared, but integer is kept in raw_data . Current length of valid bytes in
raw_data is set to 4.
Arguments
ClearRawBytes RawData [ \FromIndex ]
RawData
Data type: rawbytes
RawData is the data container which will be cleared.
[ \FromIndex ]
Data type: num
With \FromIndex it is specified where to start clearing the contents of RawData . Everything
is cleared to the end.
If \FromIndex is not specified, all data starting at index 1 is cleared.
Program execution
Data from index 1 (default) or from \FromIndex in the specified variable is reset to 0.
The current length of valid bytes in the specified variable is set to 0 (default) or to
( FromIndex - 1) if \FromIndex is programmed.
Syntax
ClearRawBytes
[RawData ':=' ] < variable ( VAR ) of rawbytes>
['\'FromIndex ':=' <expression ( IN ) of num>]';'
Continues on next page
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
50
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data
on page 940
Copy the contents of rawbytes data
CopyRawBytes - Copy the contents of rawbytes
data on page 67
Pack DeviceNet header into rawbytes
data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page
725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page
352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes
data on page 658
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 52
|
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
49
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.17. ClearRawBytes - Clear the contents of rawbytes data
Usage
ClearRawBytes is used to set all the contents of a rawbytes variable to 0.
Basic examples
A basic example of the instruction is illustrated below.
Example 1
VAR rawbytes raw_data;
VAR num integer := 8
VAR num float := 13.4;
PackRawBytes integer, raw_data, 1 \IntX := DINT;
PackRawBytes float, raw_data, (RawBytesLen(raw_data)+1) \Float4;
ClearRawBytes raw_data \FromIndex := 5;
In the first 4 bytes the value of integer is placed (from index 1) and in the next 4 bytes
starting from index 5 the value of float .
The last instruction in the example clears the contents of raw_data , starting at index 5, i.e.
float will be cleared, but integer is kept in raw_data . Current length of valid bytes in
raw_data is set to 4.
Arguments
ClearRawBytes RawData [ \FromIndex ]
RawData
Data type: rawbytes
RawData is the data container which will be cleared.
[ \FromIndex ]
Data type: num
With \FromIndex it is specified where to start clearing the contents of RawData . Everything
is cleared to the end.
If \FromIndex is not specified, all data starting at index 1 is cleared.
Program execution
Data from index 1 (default) or from \FromIndex in the specified variable is reset to 0.
The current length of valid bytes in the specified variable is set to 0 (default) or to
( FromIndex - 1) if \FromIndex is programmed.
Syntax
ClearRawBytes
[RawData ':=' ] < variable ( VAR ) of rawbytes>
['\'FromIndex ':=' <expression ( IN ) of num>]';'
Continues on next page
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
50
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data
on page 940
Copy the contents of rawbytes data
CopyRawBytes - Copy the contents of rawbytes
data on page 67
Pack DeviceNet header into rawbytes
data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page
725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page
352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes
data on page 658
Continued
1 Instructions
1.18. ClkReset - Resets a clock used for timing
RobotWare - OS
51
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.18. ClkReset - Resets a clock used for timing
Usage
ClkReset is used to reset a clock that functions as a stop-watch used for timing.
This instruction can be used before using a clock to make sure that it is set to 0.
Basic examples
A basic example of the instruction ClkReset is illustrated below.
Example 1
ClkReset clock1;
The clock clock1 is reset.
Arguments
ClkReset Clock
Clock
Data type: clock
The name of the clock to reset.
Program execution
When a clock is reset, it is set to 0.
If a clock is running it will be stopped and then reset.
Syntax
ClkReset
[ Clock ':=' ] < variable ( VAR ) of clock > ';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 53
|
1 Instructions
1.17. ClearRawBytes - Clear the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
50
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data
on page 940
Copy the contents of rawbytes data
CopyRawBytes - Copy the contents of rawbytes
data on page 67
Pack DeviceNet header into rawbytes
data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page
725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page
352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes
data on page 658
Continued
1 Instructions
1.18. ClkReset - Resets a clock used for timing
RobotWare - OS
51
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.18. ClkReset - Resets a clock used for timing
Usage
ClkReset is used to reset a clock that functions as a stop-watch used for timing.
This instruction can be used before using a clock to make sure that it is set to 0.
Basic examples
A basic example of the instruction ClkReset is illustrated below.
Example 1
ClkReset clock1;
The clock clock1 is reset.
Arguments
ClkReset Clock
Clock
Data type: clock
The name of the clock to reset.
Program execution
When a clock is reset, it is set to 0.
If a clock is running it will be stopped and then reset.
Syntax
ClkReset
[ Clock ':=' ] < variable ( VAR ) of clock > ';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
52
© Copyright 2004-2010 ABB. All rights reserved.
1.19. ClkStart - Starts a clock used for timing
Usage
ClkStart is used to start a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStart is illustrated below.
Example 1
ClkStart clock1;
The clock clock1 is started.
Arguments
ClkStart Clock
Clock
Data type: clock
The name of the clock to start.
Program execution
When a clock is started, it will run and continue counting seconds until it is stopped.
A clock continues to run when the program that started it is stopped. However, the event that
you intended to time may no longer be valid. For example, if the program was measuring the
waiting time for an input, the input may have been received while the program was stopped.
In this case, the program will not be able to “see” the event that occurred while the program
was stopped.
A clock continues to run when the robot is powered down as long as the battery back-up
retains the program that contains the clock variable.
If a clock is running it can be read, stopped, or reset.
More examples
More examples of the instruction ClkStart are illustrated below.
Example 1
VAR clock clock2;
VAR num time;
ClkReset clock2;
ClkStart clock2;
WaitUntil di1 = 1;
ClkStop clock2;
time:=ClkRead(clock2);
The waiting time for di1 to become 1 is measured.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 54
|
1 Instructions
1.18. ClkReset - Resets a clock used for timing
RobotWare - OS
51
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.18. ClkReset - Resets a clock used for timing
Usage
ClkReset is used to reset a clock that functions as a stop-watch used for timing.
This instruction can be used before using a clock to make sure that it is set to 0.
Basic examples
A basic example of the instruction ClkReset is illustrated below.
Example 1
ClkReset clock1;
The clock clock1 is reset.
Arguments
ClkReset Clock
Clock
Data type: clock
The name of the clock to reset.
Program execution
When a clock is reset, it is set to 0.
If a clock is running it will be stopped and then reset.
Syntax
ClkReset
[ Clock ':=' ] < variable ( VAR ) of clock > ';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
52
© Copyright 2004-2010 ABB. All rights reserved.
1.19. ClkStart - Starts a clock used for timing
Usage
ClkStart is used to start a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStart is illustrated below.
Example 1
ClkStart clock1;
The clock clock1 is started.
Arguments
ClkStart Clock
Clock
Data type: clock
The name of the clock to start.
Program execution
When a clock is started, it will run and continue counting seconds until it is stopped.
A clock continues to run when the program that started it is stopped. However, the event that
you intended to time may no longer be valid. For example, if the program was measuring the
waiting time for an input, the input may have been received while the program was stopped.
In this case, the program will not be able to “see” the event that occurred while the program
was stopped.
A clock continues to run when the robot is powered down as long as the battery back-up
retains the program that contains the clock variable.
If a clock is running it can be read, stopped, or reset.
More examples
More examples of the instruction ClkStart are illustrated below.
Example 1
VAR clock clock2;
VAR num time;
ClkReset clock2;
ClkStart clock2;
WaitUntil di1 = 1;
ClkStop clock2;
time:=ClkRead(clock2);
The waiting time for di1 to become 1 is measured.
Continues on next page
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
53
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStart
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 55
|
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
52
© Copyright 2004-2010 ABB. All rights reserved.
1.19. ClkStart - Starts a clock used for timing
Usage
ClkStart is used to start a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStart is illustrated below.
Example 1
ClkStart clock1;
The clock clock1 is started.
Arguments
ClkStart Clock
Clock
Data type: clock
The name of the clock to start.
Program execution
When a clock is started, it will run and continue counting seconds until it is stopped.
A clock continues to run when the program that started it is stopped. However, the event that
you intended to time may no longer be valid. For example, if the program was measuring the
waiting time for an input, the input may have been received while the program was stopped.
In this case, the program will not be able to “see” the event that occurred while the program
was stopped.
A clock continues to run when the robot is powered down as long as the battery back-up
retains the program that contains the clock variable.
If a clock is running it can be read, stopped, or reset.
More examples
More examples of the instruction ClkStart are illustrated below.
Example 1
VAR clock clock2;
VAR num time;
ClkReset clock2;
ClkStart clock2;
WaitUntil di1 = 1;
ClkStop clock2;
time:=ClkRead(clock2);
The waiting time for di1 to become 1 is measured.
Continues on next page
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
53
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStart
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.20. ClkStop - Stops a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
54
© Copyright 2004-2010 ABB. All rights reserved.
1.20. ClkStop - Stops a clock used for timing
Usage
ClkStop is used to stop a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStop is illustrated below.
ClkStop clock1;
The clock clock1 is stopped.
Arguments
ClkStop Clock
Clock
Data type: clock
The name of the clock to stop.
Program execution
When a clock is stopped, it will stop running.
If a clock is stopped, it can be read, started again, or reset.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStop
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
More examples
ClkStart - Starts a clock used for timing on page 52
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 56
|
1 Instructions
1.19. ClkStart - Starts a clock used for timing
RobotWare - OS
53
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStart
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
Continued
1 Instructions
1.20. ClkStop - Stops a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
54
© Copyright 2004-2010 ABB. All rights reserved.
1.20. ClkStop - Stops a clock used for timing
Usage
ClkStop is used to stop a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStop is illustrated below.
ClkStop clock1;
The clock clock1 is stopped.
Arguments
ClkStop Clock
Clock
Data type: clock
The name of the clock to stop.
Program execution
When a clock is stopped, it will stop running.
If a clock is stopped, it can be read, started again, or reset.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStop
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
More examples
ClkStart - Starts a clock used for timing on page 52
1 Instructions
1.21. Close - Closes a file or serial channel
RobotWare - OS
55
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.21. Close - Closes a file or serial channel
Usage
Close is used to close a file or serial channel.
Basic examples
A basic example of the instruction Close is illustrated below.
Example 1
Close channel2;
The serial channel referred to by channel2 is closed.
Arguments
Close IODevice
IODevice
Data type: iodev
The name (reference) of the file or serial channel to be closed.
Program execution
The specified file or serial channel is closed and must be re-opened before reading or writing.
If it is already closed the instruction is ignored.
Syntax
Close
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a file or serial channel
Technical reference manual - RAPID overview
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 57
|
1 Instructions
1.20. ClkStop - Stops a clock used for timing
RobotWare - OS
3HAC 16581-1 Revision: J
54
© Copyright 2004-2010 ABB. All rights reserved.
1.20. ClkStop - Stops a clock used for timing
Usage
ClkStop is used to stop a clock that functions as a stop-watch used for timing.
Basic examples
A basic example of the instruction ClkStop is illustrated below.
ClkStop clock1;
The clock clock1 is stopped.
Arguments
ClkStop Clock
Clock
Data type: clock
The name of the clock to stop.
Program execution
When a clock is stopped, it will stop running.
If a clock is stopped, it can be read, started again, or reset.
Error handling
If the clock runs for 4,294,967 seconds (49 days 17 hours 2 minutes 47 seconds) it becomes
overflowed and the system variable ERRNO is set to ERR_OVERFLOW.
The error can be handled in the error handler.
Syntax
ClkStop
[ Clock ':=' ] < variable ( VAR ) of clock >';'
Related Information
For information about
See
Other clock instructions
Technical reference manual - RAPID overview
More examples
ClkStart - Starts a clock used for timing on page 52
1 Instructions
1.21. Close - Closes a file or serial channel
RobotWare - OS
55
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.21. Close - Closes a file or serial channel
Usage
Close is used to close a file or serial channel.
Basic examples
A basic example of the instruction Close is illustrated below.
Example 1
Close channel2;
The serial channel referred to by channel2 is closed.
Arguments
Close IODevice
IODevice
Data type: iodev
The name (reference) of the file or serial channel to be closed.
Program execution
The specified file or serial channel is closed and must be re-opened before reading or writing.
If it is already closed the instruction is ignored.
Syntax
Close
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a file or serial channel
Technical reference manual - RAPID overview
1 Instructions
1.22. CloseDir - Close a directory
RobotWare - OS
3HAC 16581-1 Revision: J
56
© Copyright 2004-2010 ABB. All rights reserved.
1.22. CloseDir - Close a directory
Usage
CloseDir is used to close a directory in balance with OpenDir .
Basic examples
A basic example of the instruction CloseDir is illustrated below.
Example 1
PROC lsdir(string dirname)
VAR dir directory;
VAR string filename;
OpenDir directory, dirname;
WHILE ReadDir(directory, filename) DO
TPWrite filename;
ENDWHILE
CloseDir directory;
ENDPROC
This example prints out the names of all files or subdirectories under the specified directory.
Arguments
CloseDir Dev
Dev
Data type: dir
A variable with reference to the directory fetched with instruction OpenDir .
Syntax
CloseDir
[ Dev ':=' ] < variable ( VAR ) of dir>';'
Related information
For information about
See
Directory
dir - File directory structure on page 1103
Make a directory
MakeDir - Create a new directory on page 218
Open a directory
OpenDir - Open a directory on page 285
Read a directory
ReadDir - Read next entry in a directory on page 944
Remove a directory
RemoveDir - Delete a directory on page 355
Remove a file
RemoveFile - Delete a file on page 356
Rename a file
RenameFile - Rename a file on page 357
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 58
|
1 Instructions
1.21. Close - Closes a file or serial channel
RobotWare - OS
55
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.21. Close - Closes a file or serial channel
Usage
Close is used to close a file or serial channel.
Basic examples
A basic example of the instruction Close is illustrated below.
Example 1
Close channel2;
The serial channel referred to by channel2 is closed.
Arguments
Close IODevice
IODevice
Data type: iodev
The name (reference) of the file or serial channel to be closed.
Program execution
The specified file or serial channel is closed and must be re-opened before reading or writing.
If it is already closed the instruction is ignored.
Syntax
Close
[IODevice ':='] <variable ( VAR ) of iodev>';'
Related information
For information about
See
Opening a file or serial channel
Technical reference manual - RAPID overview
1 Instructions
1.22. CloseDir - Close a directory
RobotWare - OS
3HAC 16581-1 Revision: J
56
© Copyright 2004-2010 ABB. All rights reserved.
1.22. CloseDir - Close a directory
Usage
CloseDir is used to close a directory in balance with OpenDir .
Basic examples
A basic example of the instruction CloseDir is illustrated below.
Example 1
PROC lsdir(string dirname)
VAR dir directory;
VAR string filename;
OpenDir directory, dirname;
WHILE ReadDir(directory, filename) DO
TPWrite filename;
ENDWHILE
CloseDir directory;
ENDPROC
This example prints out the names of all files or subdirectories under the specified directory.
Arguments
CloseDir Dev
Dev
Data type: dir
A variable with reference to the directory fetched with instruction OpenDir .
Syntax
CloseDir
[ Dev ':=' ] < variable ( VAR ) of dir>';'
Related information
For information about
See
Directory
dir - File directory structure on page 1103
Make a directory
MakeDir - Create a new directory on page 218
Open a directory
OpenDir - Open a directory on page 285
Read a directory
ReadDir - Read next entry in a directory on page 944
Remove a directory
RemoveDir - Delete a directory on page 355
Remove a file
RemoveFile - Delete a file on page 356
Rename a file
RenameFile - Rename a file on page 357
1 Instructions
1.23. Comment - Comment
RobotWare - OS
57
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.23. Comment - Comment
Usage
Comment is only used to make the program easier to understand. It has no effect on the
execution of the program.
Basic examples
A basic example of the instruction Comment is illustrated below.
Example 1
! Goto the position above pallet
MoveL p100, v500, z20, tool1;
A comment is inserted into the program to make it easier to understand.
Arguments
! Comment
Comment
Text string
Any text.
Program execution
Nothing happens when you execute this instruction.
Syntax
(EBNF)
'!' {<character>} <newline>
Related information
For information about
See
Characters permitted in a comment
Technical reference manual - RAPID overview
Comments within data and routine dec-
larations
Technical reference manual - RAPID overview
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 59
|
1 Instructions
1.22. CloseDir - Close a directory
RobotWare - OS
3HAC 16581-1 Revision: J
56
© Copyright 2004-2010 ABB. All rights reserved.
1.22. CloseDir - Close a directory
Usage
CloseDir is used to close a directory in balance with OpenDir .
Basic examples
A basic example of the instruction CloseDir is illustrated below.
Example 1
PROC lsdir(string dirname)
VAR dir directory;
VAR string filename;
OpenDir directory, dirname;
WHILE ReadDir(directory, filename) DO
TPWrite filename;
ENDWHILE
CloseDir directory;
ENDPROC
This example prints out the names of all files or subdirectories under the specified directory.
Arguments
CloseDir Dev
Dev
Data type: dir
A variable with reference to the directory fetched with instruction OpenDir .
Syntax
CloseDir
[ Dev ':=' ] < variable ( VAR ) of dir>';'
Related information
For information about
See
Directory
dir - File directory structure on page 1103
Make a directory
MakeDir - Create a new directory on page 218
Open a directory
OpenDir - Open a directory on page 285
Read a directory
ReadDir - Read next entry in a directory on page 944
Remove a directory
RemoveDir - Delete a directory on page 355
Remove a file
RemoveFile - Delete a file on page 356
Rename a file
RenameFile - Rename a file on page 357
1 Instructions
1.23. Comment - Comment
RobotWare - OS
57
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.23. Comment - Comment
Usage
Comment is only used to make the program easier to understand. It has no effect on the
execution of the program.
Basic examples
A basic example of the instruction Comment is illustrated below.
Example 1
! Goto the position above pallet
MoveL p100, v500, z20, tool1;
A comment is inserted into the program to make it easier to understand.
Arguments
! Comment
Comment
Text string
Any text.
Program execution
Nothing happens when you execute this instruction.
Syntax
(EBNF)
'!' {<character>} <newline>
Related information
For information about
See
Characters permitted in a comment
Technical reference manual - RAPID overview
Comments within data and routine dec-
larations
Technical reference manual - RAPID overview
1 Instructions
1.24. Compact IF - If a condition is met, then... (one instruction)
RobotWare - OS
3HAC 16581-1 Revision: J
58
© Copyright 2004-2010 ABB. All rights reserved.
1.24. Compact IF - If a condition is met, then... (one instruction)
Usage
Compact IF is used when a single instruction is only to be executed if a given condition is
met.
If different instructions are to be executed, depending on whether the specified condition is
met or not, the IF instruction is used.
Basic examples
Basic examples of the instruction CompactIF are illustrated below.
Example 1
IF reg1 > 5 GOTO next;
If reg1 is greater than 5 , program execution continues at the next label.
Example 2
IF counter > 10 Set do1;
The do1 signal is set if counter > 10 .
Arguments
IF Condition ...
Condition
Data type: bool
The condition that must be satisfied for the instruction to be executed.
Syntax
(EBNF)
IF <conditional expression> ( <instruction> | < SMT >) ';'
Related information
For information about
See
Conditions (logical expressions
Technical reference manual - RAPID overview
IF with several instructions
IF - If a condition is met, then ...; otherwise ... on
page 129
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 60
|
1 Instructions
1.23. Comment - Comment
RobotWare - OS
57
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.23. Comment - Comment
Usage
Comment is only used to make the program easier to understand. It has no effect on the
execution of the program.
Basic examples
A basic example of the instruction Comment is illustrated below.
Example 1
! Goto the position above pallet
MoveL p100, v500, z20, tool1;
A comment is inserted into the program to make it easier to understand.
Arguments
! Comment
Comment
Text string
Any text.
Program execution
Nothing happens when you execute this instruction.
Syntax
(EBNF)
'!' {<character>} <newline>
Related information
For information about
See
Characters permitted in a comment
Technical reference manual - RAPID overview
Comments within data and routine dec-
larations
Technical reference manual - RAPID overview
1 Instructions
1.24. Compact IF - If a condition is met, then... (one instruction)
RobotWare - OS
3HAC 16581-1 Revision: J
58
© Copyright 2004-2010 ABB. All rights reserved.
1.24. Compact IF - If a condition is met, then... (one instruction)
Usage
Compact IF is used when a single instruction is only to be executed if a given condition is
met.
If different instructions are to be executed, depending on whether the specified condition is
met or not, the IF instruction is used.
Basic examples
Basic examples of the instruction CompactIF are illustrated below.
Example 1
IF reg1 > 5 GOTO next;
If reg1 is greater than 5 , program execution continues at the next label.
Example 2
IF counter > 10 Set do1;
The do1 signal is set if counter > 10 .
Arguments
IF Condition ...
Condition
Data type: bool
The condition that must be satisfied for the instruction to be executed.
Syntax
(EBNF)
IF <conditional expression> ( <instruction> | < SMT >) ';'
Related information
For information about
See
Conditions (logical expressions
Technical reference manual - RAPID overview
IF with several instructions
IF - If a condition is met, then ...; otherwise ... on
page 129
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
59
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.25. ConfJ - Controls the configuration during joint movement
Usage
ConfJ ( Configuration Joint ) is used to specify whether or not the robot’s configuration is to
be controlled during joint movement. If it is not controlled, the robot can sometimes use a
different configuration than that which was programmed.
With ConfJ \Off , the robot cannot switch main axis configuration - it will search for a
solution with the same main axis configuration as the current one, but it moves to the closest
wrist configuration for axes 4 and 6.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction ConfJ are illustrated below.
Example 1
ConfJ \Off;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position and orientation. If this position can be reached
in several different ways, with different axis configurations, the closest possible position is
chosen.
Example 2
ConfJ \On;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and axis configuration. If this is not
possible, program execution stops.
Arguments
ConfJ [\On] | [\Off]
[ \On ]
Data type: switch
The robot always moves to the programmed axis configuration. If this is not possible using
the programmed position and orientation, program execution stops.
The IRB5400 robot will move to the programmed axis configuration or to an axis
configuration close the the programmed one. Program execution will not stop if it is
impossible to reach the programmed axis configuration.
[ \Off ]
Data type: switch
The robot always moves to the closest axis configuration.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 61
|
1 Instructions
1.24. Compact IF - If a condition is met, then... (one instruction)
RobotWare - OS
3HAC 16581-1 Revision: J
58
© Copyright 2004-2010 ABB. All rights reserved.
1.24. Compact IF - If a condition is met, then... (one instruction)
Usage
Compact IF is used when a single instruction is only to be executed if a given condition is
met.
If different instructions are to be executed, depending on whether the specified condition is
met or not, the IF instruction is used.
Basic examples
Basic examples of the instruction CompactIF are illustrated below.
Example 1
IF reg1 > 5 GOTO next;
If reg1 is greater than 5 , program execution continues at the next label.
Example 2
IF counter > 10 Set do1;
The do1 signal is set if counter > 10 .
Arguments
IF Condition ...
Condition
Data type: bool
The condition that must be satisfied for the instruction to be executed.
Syntax
(EBNF)
IF <conditional expression> ( <instruction> | < SMT >) ';'
Related information
For information about
See
Conditions (logical expressions
Technical reference manual - RAPID overview
IF with several instructions
IF - If a condition is met, then ...; otherwise ... on
page 129
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
59
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.25. ConfJ - Controls the configuration during joint movement
Usage
ConfJ ( Configuration Joint ) is used to specify whether or not the robot’s configuration is to
be controlled during joint movement. If it is not controlled, the robot can sometimes use a
different configuration than that which was programmed.
With ConfJ \Off , the robot cannot switch main axis configuration - it will search for a
solution with the same main axis configuration as the current one, but it moves to the closest
wrist configuration for axes 4 and 6.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction ConfJ are illustrated below.
Example 1
ConfJ \Off;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position and orientation. If this position can be reached
in several different ways, with different axis configurations, the closest possible position is
chosen.
Example 2
ConfJ \On;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and axis configuration. If this is not
possible, program execution stops.
Arguments
ConfJ [\On] | [\Off]
[ \On ]
Data type: switch
The robot always moves to the programmed axis configuration. If this is not possible using
the programmed position and orientation, program execution stops.
The IRB5400 robot will move to the programmed axis configuration or to an axis
configuration close the the programmed one. Program execution will not stop if it is
impossible to reach the programmed axis configuration.
[ \Off ]
Data type: switch
The robot always moves to the closest axis configuration.
Continues on next page
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
3HAC 16581-1 Revision: J
60
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
If the argument \On (or no argument) is chosen, the robot always moves to the programmed
axis configuration. If this is not possible using the programmed position and orientation,
program execution stops before the movement starts.
If the argument \Off is chosen, the robot always moves to the closest axis configuration. This
may be different to the programmed one if the configuration has been incorrectly specified
manually, or if a program displacement has been carried out.
To control the configuration ( ConfJ \On ) is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfJ
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during linear
movement
ConfL - Monitors the configuration during linear
movement on page 61
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 62
|
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
59
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.25. ConfJ - Controls the configuration during joint movement
Usage
ConfJ ( Configuration Joint ) is used to specify whether or not the robot’s configuration is to
be controlled during joint movement. If it is not controlled, the robot can sometimes use a
different configuration than that which was programmed.
With ConfJ \Off , the robot cannot switch main axis configuration - it will search for a
solution with the same main axis configuration as the current one, but it moves to the closest
wrist configuration for axes 4 and 6.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction ConfJ are illustrated below.
Example 1
ConfJ \Off;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position and orientation. If this position can be reached
in several different ways, with different axis configurations, the closest possible position is
chosen.
Example 2
ConfJ \On;
MoveJ *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and axis configuration. If this is not
possible, program execution stops.
Arguments
ConfJ [\On] | [\Off]
[ \On ]
Data type: switch
The robot always moves to the programmed axis configuration. If this is not possible using
the programmed position and orientation, program execution stops.
The IRB5400 robot will move to the programmed axis configuration or to an axis
configuration close the the programmed one. Program execution will not stop if it is
impossible to reach the programmed axis configuration.
[ \Off ]
Data type: switch
The robot always moves to the closest axis configuration.
Continues on next page
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
3HAC 16581-1 Revision: J
60
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
If the argument \On (or no argument) is chosen, the robot always moves to the programmed
axis configuration. If this is not possible using the programmed position and orientation,
program execution stops before the movement starts.
If the argument \Off is chosen, the robot always moves to the closest axis configuration. This
may be different to the programmed one if the configuration has been incorrectly specified
manually, or if a program displacement has been carried out.
To control the configuration ( ConfJ \On ) is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfJ
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during linear
movement
ConfL - Monitors the configuration during linear
movement on page 61
Continued
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
61
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.26. ConfL - Monitors the configuration during linear movement
Usage
ConfL ( Configuration Linear ) is used to specify whether or not the robot’s configuration is
to be monitored during linear or circular movement. If it is not monitored, the configuration
at execution time may differ from that at programmed time. It may also result in unexpected
sweeping robot movements when the mode is changed to joint movement.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
NOTE!
For the IRB 5400 robot monitoring is always off independent of what is specified in ConfL .
Basic examples
Basic examples of the instruction ConfL are illustrated below.
Example 1
ConfL \On;
MoveL *, v1000, fine, tool1;
Program execution stops when the programmed configuration is not possible to reach from
the current position.
Example 2
SingArea \Wrist;
ConfL \On;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and wrist axis configuration. If this
is not possible, program execution stops.
Example 3
ConfL \Off;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position and orientation but to the closest possible axis
configuration, which can be different from the programmed.
Arguments
ConfL [\On]|[\Off]
[ \On ]
Data type: switch
The robot configuration is monitored.
[ \Off ]
Data type: switch
The robot configuration is not monitored.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 63
|
1 Instructions
1.25. ConfJ - Controls the configuration during joint movement
RobotWare - OS
3HAC 16581-1 Revision: J
60
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
If the argument \On (or no argument) is chosen, the robot always moves to the programmed
axis configuration. If this is not possible using the programmed position and orientation,
program execution stops before the movement starts.
If the argument \Off is chosen, the robot always moves to the closest axis configuration. This
may be different to the programmed one if the configuration has been incorrectly specified
manually, or if a program displacement has been carried out.
To control the configuration ( ConfJ \On ) is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfJ
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during linear
movement
ConfL - Monitors the configuration during linear
movement on page 61
Continued
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
61
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.26. ConfL - Monitors the configuration during linear movement
Usage
ConfL ( Configuration Linear ) is used to specify whether or not the robot’s configuration is
to be monitored during linear or circular movement. If it is not monitored, the configuration
at execution time may differ from that at programmed time. It may also result in unexpected
sweeping robot movements when the mode is changed to joint movement.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
NOTE!
For the IRB 5400 robot monitoring is always off independent of what is specified in ConfL .
Basic examples
Basic examples of the instruction ConfL are illustrated below.
Example 1
ConfL \On;
MoveL *, v1000, fine, tool1;
Program execution stops when the programmed configuration is not possible to reach from
the current position.
Example 2
SingArea \Wrist;
ConfL \On;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and wrist axis configuration. If this
is not possible, program execution stops.
Example 3
ConfL \Off;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position and orientation but to the closest possible axis
configuration, which can be different from the programmed.
Arguments
ConfL [\On]|[\Off]
[ \On ]
Data type: switch
The robot configuration is monitored.
[ \Off ]
Data type: switch
The robot configuration is not monitored.
Continues on next page
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
3HAC 16581-1 Revision: J
62
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
During linear or circular movement, the robot always moves to the programmed position and
orientation that has the closest possible axis configuration. If the argument \On (or no
argument) is chosen, then the program execution stops as soon as there’s a risk that the
configuration of the programmed position will not be attained from the current position.
However, it is possible to restart the program again, although the wrist axes may continue to
be the wrong configuration. At a stop point, the robot will check that the configurations of all
axes are achieved, not only the wrist axes.
If SingArea\Wrist is also used, the robot always moves to the programmed wrist axis
configuration and at a stop point the remaining axes configurations will be checked.
If the argument \Off is chosen, there is no monitoring.
A simple rule to avoid problems, both for ConfL\On and \Off , is to insert intermediate
points to make the movement of each axis less than 90 degrees between points. More
precisely, the sum of movements for any of the par of axes (1+4), (1+6), (3+4) or (3+6) should
not exceed 180 degrees.
If ConfL\Off is used with a big movement, it can cause stops directly or later in the program
with error 50050 Position outside reach or 50080 Position not compatible . In
a program with ConfL\Off it is recommended to have movements to known configurations
points with“ ConfJ\On + MoveJ ” or “ ConfL\On + SingArea\Wrist + MoveL ” as start
points for different program parts.
Monitoring is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfL
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during joint
movement
ConfJ - Controls the configuration during joint
movement on page 59
Define interpolation around singular
points
SingArea - Defines interpolation around singular
points on page 447
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 64
|
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
61
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.26. ConfL - Monitors the configuration during linear movement
Usage
ConfL ( Configuration Linear ) is used to specify whether or not the robot’s configuration is
to be monitored during linear or circular movement. If it is not monitored, the configuration
at execution time may differ from that at programmed time. It may also result in unexpected
sweeping robot movements when the mode is changed to joint movement.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
NOTE!
For the IRB 5400 robot monitoring is always off independent of what is specified in ConfL .
Basic examples
Basic examples of the instruction ConfL are illustrated below.
Example 1
ConfL \On;
MoveL *, v1000, fine, tool1;
Program execution stops when the programmed configuration is not possible to reach from
the current position.
Example 2
SingArea \Wrist;
ConfL \On;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position, orientation and wrist axis configuration. If this
is not possible, program execution stops.
Example 3
ConfL \Off;
MoveL *, v1000, fine, tool1;
The robot moves to the programmed position and orientation but to the closest possible axis
configuration, which can be different from the programmed.
Arguments
ConfL [\On]|[\Off]
[ \On ]
Data type: switch
The robot configuration is monitored.
[ \Off ]
Data type: switch
The robot configuration is not monitored.
Continues on next page
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
3HAC 16581-1 Revision: J
62
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
During linear or circular movement, the robot always moves to the programmed position and
orientation that has the closest possible axis configuration. If the argument \On (or no
argument) is chosen, then the program execution stops as soon as there’s a risk that the
configuration of the programmed position will not be attained from the current position.
However, it is possible to restart the program again, although the wrist axes may continue to
be the wrong configuration. At a stop point, the robot will check that the configurations of all
axes are achieved, not only the wrist axes.
If SingArea\Wrist is also used, the robot always moves to the programmed wrist axis
configuration and at a stop point the remaining axes configurations will be checked.
If the argument \Off is chosen, there is no monitoring.
A simple rule to avoid problems, both for ConfL\On and \Off , is to insert intermediate
points to make the movement of each axis less than 90 degrees between points. More
precisely, the sum of movements for any of the par of axes (1+4), (1+6), (3+4) or (3+6) should
not exceed 180 degrees.
If ConfL\Off is used with a big movement, it can cause stops directly or later in the program
with error 50050 Position outside reach or 50080 Position not compatible . In
a program with ConfL\Off it is recommended to have movements to known configurations
points with“ ConfJ\On + MoveJ ” or “ ConfL\On + SingArea\Wrist + MoveL ” as start
points for different program parts.
Monitoring is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfL
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during joint
movement
ConfJ - Controls the configuration during joint
movement on page 59
Define interpolation around singular
points
SingArea - Defines interpolation around singular
points on page 447
Continued
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
63
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.27. CONNECT - Connects an interrupt to a trap routine
Usage
CONNECT is used to find the identity of an interrupt and connect it to a trap routine.
The interrupt is defined by ordering an interrupt event and specifying its identity. Thus, when
that event occurs, the trap routine is automatically executed.
Basic examples
A basic example of the instruction CONNECT is illustrated below.
Example 1
VAR intnum feeder_low;
CONNECT feeder_low WITH feeder_empty;
ISignalDI di1, 1 , feeder_low;
An interrupt identity feeder_low is created which is connected to the trap routine
feeder_empty . There will be an interrupt when input di1 is getting high. In other words,
when this signal becomes high, the feeder_empty trap routine is executed.
Arguments
CONNECT Interrupt WITH Trap routine
Interrupt
Data type: intnum
The variable that is to be assigned the identity of the interrupt. This must not be declared
within a routine (routine data).
Trap routine
Identifier
The name of the trap routine.
Program execution
The variable is assigned an interrupt identity which shall be used when ordering or disabling
interrupts. This identity is also connected to the specified trap routine.
NOTE!
All interrupts in a task are cancelled when program pointer is set to main for that task and
must be reconnected. The interrupts will not be affected by a power fail or a warm start.
Limitations
An interrupt (interrupt identity) cannot be connected to more than one trap routine. Different
interrupts, however, can be connected to the same trap routine.
When an interrupt has been connected to a trap routine, it cannot be reconnected or
transferred to another routine; it must first be deleted using the instruction IDelete .
Interrupts that come or have not been handled when program execution is stopped will be
neglected. The interrupts are not considered when stopping the program.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 65
|
1 Instructions
1.26. ConfL - Monitors the configuration during linear movement
RobotWare - OS
3HAC 16581-1 Revision: J
62
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
During linear or circular movement, the robot always moves to the programmed position and
orientation that has the closest possible axis configuration. If the argument \On (or no
argument) is chosen, then the program execution stops as soon as there’s a risk that the
configuration of the programmed position will not be attained from the current position.
However, it is possible to restart the program again, although the wrist axes may continue to
be the wrong configuration. At a stop point, the robot will check that the configurations of all
axes are achieved, not only the wrist axes.
If SingArea\Wrist is also used, the robot always moves to the programmed wrist axis
configuration and at a stop point the remaining axes configurations will be checked.
If the argument \Off is chosen, there is no monitoring.
A simple rule to avoid problems, both for ConfL\On and \Off , is to insert intermediate
points to make the movement of each axis less than 90 degrees between points. More
precisely, the sum of movements for any of the par of axes (1+4), (1+6), (3+4) or (3+6) should
not exceed 180 degrees.
If ConfL\Off is used with a big movement, it can cause stops directly or later in the program
with error 50050 Position outside reach or 50080 Position not compatible . In
a program with ConfL\Off it is recommended to have movements to known configurations
points with“ ConfJ\On + MoveJ ” or “ ConfL\On + SingArea\Wrist + MoveL ” as start
points for different program parts.
Monitoring is active by default. This is automatically set:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
Syntax
ConfL
[ '\' On] | [ '\' Off]';'
Related information
For information about
See
Handling different configurations
Technical reference manual - RAPID overview
Robot configuration during joint
movement
ConfJ - Controls the configuration during joint
movement on page 59
Define interpolation around singular
points
SingArea - Defines interpolation around singular
points on page 447
Continued
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
63
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.27. CONNECT - Connects an interrupt to a trap routine
Usage
CONNECT is used to find the identity of an interrupt and connect it to a trap routine.
The interrupt is defined by ordering an interrupt event and specifying its identity. Thus, when
that event occurs, the trap routine is automatically executed.
Basic examples
A basic example of the instruction CONNECT is illustrated below.
Example 1
VAR intnum feeder_low;
CONNECT feeder_low WITH feeder_empty;
ISignalDI di1, 1 , feeder_low;
An interrupt identity feeder_low is created which is connected to the trap routine
feeder_empty . There will be an interrupt when input di1 is getting high. In other words,
when this signal becomes high, the feeder_empty trap routine is executed.
Arguments
CONNECT Interrupt WITH Trap routine
Interrupt
Data type: intnum
The variable that is to be assigned the identity of the interrupt. This must not be declared
within a routine (routine data).
Trap routine
Identifier
The name of the trap routine.
Program execution
The variable is assigned an interrupt identity which shall be used when ordering or disabling
interrupts. This identity is also connected to the specified trap routine.
NOTE!
All interrupts in a task are cancelled when program pointer is set to main for that task and
must be reconnected. The interrupts will not be affected by a power fail or a warm start.
Limitations
An interrupt (interrupt identity) cannot be connected to more than one trap routine. Different
interrupts, however, can be connected to the same trap routine.
When an interrupt has been connected to a trap routine, it cannot be reconnected or
transferred to another routine; it must first be deleted using the instruction IDelete .
Interrupts that come or have not been handled when program execution is stopped will be
neglected. The interrupts are not considered when stopping the program.
Continues on next page
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
3HAC 16581-1 Revision: J
64
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the interrupt variable is already connected to a TRAP routine, the system variable ERRNO is
set to ERR_ALRDYCNT .
If the interrupt variable is not a variable reference, the system variable ERRNO is set to
ERR_CNTNOTVAR .
If no more interrupt numbers are available, the system variable ERRNO is set to ERR_INOMAX .
These errors can be handled in the ERROR handler.
Syntax
(EBNF)
CONNECT <connect target> WITH <trap>';'
<connect target> ::= <variable>
| <parameter>
| < VAR >
<trap> ::= <identifier>
Related information
For information about
See
Summary of interrupts
Technical reference manual - RAPID overview
More information on interrupt management
Technical reference manual - RAPID overview
Data type for interrupt
intnum - Interrupt identity on page 1125
Cancelling an interrupt
IDelete - Cancels an interrupt on page 123
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 66
|
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
63
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.27. CONNECT - Connects an interrupt to a trap routine
Usage
CONNECT is used to find the identity of an interrupt and connect it to a trap routine.
The interrupt is defined by ordering an interrupt event and specifying its identity. Thus, when
that event occurs, the trap routine is automatically executed.
Basic examples
A basic example of the instruction CONNECT is illustrated below.
Example 1
VAR intnum feeder_low;
CONNECT feeder_low WITH feeder_empty;
ISignalDI di1, 1 , feeder_low;
An interrupt identity feeder_low is created which is connected to the trap routine
feeder_empty . There will be an interrupt when input di1 is getting high. In other words,
when this signal becomes high, the feeder_empty trap routine is executed.
Arguments
CONNECT Interrupt WITH Trap routine
Interrupt
Data type: intnum
The variable that is to be assigned the identity of the interrupt. This must not be declared
within a routine (routine data).
Trap routine
Identifier
The name of the trap routine.
Program execution
The variable is assigned an interrupt identity which shall be used when ordering or disabling
interrupts. This identity is also connected to the specified trap routine.
NOTE!
All interrupts in a task are cancelled when program pointer is set to main for that task and
must be reconnected. The interrupts will not be affected by a power fail or a warm start.
Limitations
An interrupt (interrupt identity) cannot be connected to more than one trap routine. Different
interrupts, however, can be connected to the same trap routine.
When an interrupt has been connected to a trap routine, it cannot be reconnected or
transferred to another routine; it must first be deleted using the instruction IDelete .
Interrupts that come or have not been handled when program execution is stopped will be
neglected. The interrupts are not considered when stopping the program.
Continues on next page
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
3HAC 16581-1 Revision: J
64
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the interrupt variable is already connected to a TRAP routine, the system variable ERRNO is
set to ERR_ALRDYCNT .
If the interrupt variable is not a variable reference, the system variable ERRNO is set to
ERR_CNTNOTVAR .
If no more interrupt numbers are available, the system variable ERRNO is set to ERR_INOMAX .
These errors can be handled in the ERROR handler.
Syntax
(EBNF)
CONNECT <connect target> WITH <trap>';'
<connect target> ::= <variable>
| <parameter>
| < VAR >
<trap> ::= <identifier>
Related information
For information about
See
Summary of interrupts
Technical reference manual - RAPID overview
More information on interrupt management
Technical reference manual - RAPID overview
Data type for interrupt
intnum - Interrupt identity on page 1125
Cancelling an interrupt
IDelete - Cancels an interrupt on page 123
Continued
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
65
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.28. CopyFile - Copy a file
Usage
CopyFile is used to make a copy of an existing file.
Basic examples
A basic example of the instruction CopyFile is illustrated below.
Example 1
CopyFile "HOME:/myfile", "HOME:/yourfile";
The file myfile is copied to yourfile . Both files are then identical.
CopyFile "HOME:/myfile", "HOME:/mydir/yourfile";
The file myfile is copied to yourfile in directory mydir.
Arguments
CopyFile OldPath NewPath
OldPath
Data type: string
The complete path of the file to be copied from.
NewPath
Data type: string
The complete path where the file is to be copied to.
Program execution
The file specified in OldPath will be copied to the file specified in NewPath .
Error Handling
If the file specified in NewPath already exists, the system variable ERRNO is set to
ERR_FILEEXIST . This error can then be handled in the error handler.
Syntax
CopyFile
[ OldPath ':=' ] < expression (IN) of string > ','
[ NewPath ':=' ] < expression (IN) of string >';'
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 67
|
1 Instructions
1.27. CONNECT - Connects an interrupt to a trap routine
RobotWare - OS
3HAC 16581-1 Revision: J
64
© Copyright 2004-2010 ABB. All rights reserved.
Error handling
If the interrupt variable is already connected to a TRAP routine, the system variable ERRNO is
set to ERR_ALRDYCNT .
If the interrupt variable is not a variable reference, the system variable ERRNO is set to
ERR_CNTNOTVAR .
If no more interrupt numbers are available, the system variable ERRNO is set to ERR_INOMAX .
These errors can be handled in the ERROR handler.
Syntax
(EBNF)
CONNECT <connect target> WITH <trap>';'
<connect target> ::= <variable>
| <parameter>
| < VAR >
<trap> ::= <identifier>
Related information
For information about
See
Summary of interrupts
Technical reference manual - RAPID overview
More information on interrupt management
Technical reference manual - RAPID overview
Data type for interrupt
intnum - Interrupt identity on page 1125
Cancelling an interrupt
IDelete - Cancels an interrupt on page 123
Continued
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
65
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.28. CopyFile - Copy a file
Usage
CopyFile is used to make a copy of an existing file.
Basic examples
A basic example of the instruction CopyFile is illustrated below.
Example 1
CopyFile "HOME:/myfile", "HOME:/yourfile";
The file myfile is copied to yourfile . Both files are then identical.
CopyFile "HOME:/myfile", "HOME:/mydir/yourfile";
The file myfile is copied to yourfile in directory mydir.
Arguments
CopyFile OldPath NewPath
OldPath
Data type: string
The complete path of the file to be copied from.
NewPath
Data type: string
The complete path where the file is to be copied to.
Program execution
The file specified in OldPath will be copied to the file specified in NewPath .
Error Handling
If the file specified in NewPath already exists, the system variable ERRNO is set to
ERR_FILEEXIST . This error can then be handled in the error handler.
Syntax
CopyFile
[ OldPath ':=' ] < expression (IN) of string > ','
[ NewPath ':=' ] < expression (IN) of string >';'
Continues on next page
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
3HAC 16581-1 Revision: J
66
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Make a directory
MakeDir - Create a new directory on page
218
Remove a directory
RemoveDir - Delete a directory on page 355
Rename a file
RenameFile - Rename a file on page 357
Remove a file
RemoveFile - Delete a file on page 356
Check file type
IsFile - Check the type of a file on page 878
Check file size
FileSize - Retrieve the size of a file on page
842
Check file system size
FSSize - Retrieve the size of a file system on
page 848
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 68
|
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
65
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.28. CopyFile - Copy a file
Usage
CopyFile is used to make a copy of an existing file.
Basic examples
A basic example of the instruction CopyFile is illustrated below.
Example 1
CopyFile "HOME:/myfile", "HOME:/yourfile";
The file myfile is copied to yourfile . Both files are then identical.
CopyFile "HOME:/myfile", "HOME:/mydir/yourfile";
The file myfile is copied to yourfile in directory mydir.
Arguments
CopyFile OldPath NewPath
OldPath
Data type: string
The complete path of the file to be copied from.
NewPath
Data type: string
The complete path where the file is to be copied to.
Program execution
The file specified in OldPath will be copied to the file specified in NewPath .
Error Handling
If the file specified in NewPath already exists, the system variable ERRNO is set to
ERR_FILEEXIST . This error can then be handled in the error handler.
Syntax
CopyFile
[ OldPath ':=' ] < expression (IN) of string > ','
[ NewPath ':=' ] < expression (IN) of string >';'
Continues on next page
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
3HAC 16581-1 Revision: J
66
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Make a directory
MakeDir - Create a new directory on page
218
Remove a directory
RemoveDir - Delete a directory on page 355
Rename a file
RenameFile - Rename a file on page 357
Remove a file
RemoveFile - Delete a file on page 356
Check file type
IsFile - Check the type of a file on page 878
Check file size
FileSize - Retrieve the size of a file on page
842
Check file system size
FSSize - Retrieve the size of a file system on
page 848
Continued
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
67
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.29. CopyRawBytes - Copy the contents of rawbytes data
Usage
CopyRawBytes is used to copy all or part of the contents from one rawbytes variable to
another.
Basic examples
A basic example of the instruction CopyRawBytes is illustrated below.
Example 1
VAR rawbytes from_raw_data;
VAR rawbytes to_raw_data;
VAR num integer := 8
VAR num float := 13.4;
ClearRawBytes from_raw_data;
PackRawBytes integer, from_raw_data, 1 \IntX := DINT;
PackRawBytes float, from_raw_data, (RawBytesLen(from_raw_data)+1)
\Float4;
CopyRawBytes from_raw_data, 1, to_raw_data, 3,
RawBytesLen(from_raw_data);
In this example the variable from_raw_data of type rawbytes is first cleared,that is all
bytes set to 0. Then in the first 4 bytes the value of integer is placed and in the next 4 bytes
the value of float .
After having filled from_raw_data with data, the contents (8 bytes) is copied to
to_raw_data , starting at position 3 .
Arguments
CopyRawBytes FromRawData FromIndex ToRawData
ToIndex [ \NoOfBytes ]
FromRawData
Data type: rawbytes
FromRawData is the data container from which the rawbytes data shall be copied.
FromIndex
Data type: num
FromIndex is the position in FromRawData where the data to be copied starts. Indexing
starts at 1.
ToRawData
Data type: rawbytes
ToRawData is the data container to which the rawbytes data shall be copied.
ToIndex
Data type: num
ToIndex is the position in ToRawData where the data to be copied will be placed. Everything
is copied to the end. Indexing starts at 1.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 69
|
1 Instructions
1.28. CopyFile - Copy a file
RobotWare - OS
3HAC 16581-1 Revision: J
66
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Make a directory
MakeDir - Create a new directory on page
218
Remove a directory
RemoveDir - Delete a directory on page 355
Rename a file
RenameFile - Rename a file on page 357
Remove a file
RemoveFile - Delete a file on page 356
Check file type
IsFile - Check the type of a file on page 878
Check file size
FileSize - Retrieve the size of a file on page
842
Check file system size
FSSize - Retrieve the size of a file system on
page 848
Continued
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
67
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.29. CopyRawBytes - Copy the contents of rawbytes data
Usage
CopyRawBytes is used to copy all or part of the contents from one rawbytes variable to
another.
Basic examples
A basic example of the instruction CopyRawBytes is illustrated below.
Example 1
VAR rawbytes from_raw_data;
VAR rawbytes to_raw_data;
VAR num integer := 8
VAR num float := 13.4;
ClearRawBytes from_raw_data;
PackRawBytes integer, from_raw_data, 1 \IntX := DINT;
PackRawBytes float, from_raw_data, (RawBytesLen(from_raw_data)+1)
\Float4;
CopyRawBytes from_raw_data, 1, to_raw_data, 3,
RawBytesLen(from_raw_data);
In this example the variable from_raw_data of type rawbytes is first cleared,that is all
bytes set to 0. Then in the first 4 bytes the value of integer is placed and in the next 4 bytes
the value of float .
After having filled from_raw_data with data, the contents (8 bytes) is copied to
to_raw_data , starting at position 3 .
Arguments
CopyRawBytes FromRawData FromIndex ToRawData
ToIndex [ \NoOfBytes ]
FromRawData
Data type: rawbytes
FromRawData is the data container from which the rawbytes data shall be copied.
FromIndex
Data type: num
FromIndex is the position in FromRawData where the data to be copied starts. Indexing
starts at 1.
ToRawData
Data type: rawbytes
ToRawData is the data container to which the rawbytes data shall be copied.
ToIndex
Data type: num
ToIndex is the position in ToRawData where the data to be copied will be placed. Everything
is copied to the end. Indexing starts at 1.
Continues on next page
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
68
© Copyright 2004-2010 ABB. All rights reserved.
[\NoOfBytes]
Data type: num
The value specified with \NoOfBytes is the number of bytes to be copied from
FromRawData to ToRawData .
If \NoOfBytes is not specified, all bytes from FromIndex to the end of current length of
valid bytes in FromRawData is copied.
Program execution
During program execution data is copied from one rawbytes variable to another.
The current length of valid bytes in the ToRawData variable is set to:
•
( ToIndex + copied_number_of_bytes - 1)
•
The current length of valid bytes in the ToRawData variable is not changed, if the
complete copy operation is done inside the old current length of valid bytes in the
ToRawData variable.
Limitations
CopyRawBytes can not be used to copy some data from one rawbytes variable to other part
of the same rawbytes variable.
Syntax
CopyRawBytes
[FromRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[FromIndex ':=' ] < expression ( IN ) of num> ','
[ToRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[ToIndex ':=' ] < expression ( IN ) of num>
['\'NoOfBytes ':=' < expression ( IN ) of num> ]';'
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 70
|
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
67
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.29. CopyRawBytes - Copy the contents of rawbytes data
Usage
CopyRawBytes is used to copy all or part of the contents from one rawbytes variable to
another.
Basic examples
A basic example of the instruction CopyRawBytes is illustrated below.
Example 1
VAR rawbytes from_raw_data;
VAR rawbytes to_raw_data;
VAR num integer := 8
VAR num float := 13.4;
ClearRawBytes from_raw_data;
PackRawBytes integer, from_raw_data, 1 \IntX := DINT;
PackRawBytes float, from_raw_data, (RawBytesLen(from_raw_data)+1)
\Float4;
CopyRawBytes from_raw_data, 1, to_raw_data, 3,
RawBytesLen(from_raw_data);
In this example the variable from_raw_data of type rawbytes is first cleared,that is all
bytes set to 0. Then in the first 4 bytes the value of integer is placed and in the next 4 bytes
the value of float .
After having filled from_raw_data with data, the contents (8 bytes) is copied to
to_raw_data , starting at position 3 .
Arguments
CopyRawBytes FromRawData FromIndex ToRawData
ToIndex [ \NoOfBytes ]
FromRawData
Data type: rawbytes
FromRawData is the data container from which the rawbytes data shall be copied.
FromIndex
Data type: num
FromIndex is the position in FromRawData where the data to be copied starts. Indexing
starts at 1.
ToRawData
Data type: rawbytes
ToRawData is the data container to which the rawbytes data shall be copied.
ToIndex
Data type: num
ToIndex is the position in ToRawData where the data to be copied will be placed. Everything
is copied to the end. Indexing starts at 1.
Continues on next page
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
68
© Copyright 2004-2010 ABB. All rights reserved.
[\NoOfBytes]
Data type: num
The value specified with \NoOfBytes is the number of bytes to be copied from
FromRawData to ToRawData .
If \NoOfBytes is not specified, all bytes from FromIndex to the end of current length of
valid bytes in FromRawData is copied.
Program execution
During program execution data is copied from one rawbytes variable to another.
The current length of valid bytes in the ToRawData variable is set to:
•
( ToIndex + copied_number_of_bytes - 1)
•
The current length of valid bytes in the ToRawData variable is not changed, if the
complete copy operation is done inside the old current length of valid bytes in the
ToRawData variable.
Limitations
CopyRawBytes can not be used to copy some data from one rawbytes variable to other part
of the same rawbytes variable.
Syntax
CopyRawBytes
[FromRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[FromIndex ':=' ] < expression ( IN ) of num> ','
[ToRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[ToIndex ':=' ] < expression ( IN ) of num>
['\'NoOfBytes ':=' < expression ( IN ) of num> ]';'
Continued
Continues on next page
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
69
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data on
page 940
Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data
on page 49
Pack DeviceNet header into
rawbytes data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page 725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page 352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes data
on page 658
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 71
|
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
3HAC 16581-1 Revision: J
68
© Copyright 2004-2010 ABB. All rights reserved.
[\NoOfBytes]
Data type: num
The value specified with \NoOfBytes is the number of bytes to be copied from
FromRawData to ToRawData .
If \NoOfBytes is not specified, all bytes from FromIndex to the end of current length of
valid bytes in FromRawData is copied.
Program execution
During program execution data is copied from one rawbytes variable to another.
The current length of valid bytes in the ToRawData variable is set to:
•
( ToIndex + copied_number_of_bytes - 1)
•
The current length of valid bytes in the ToRawData variable is not changed, if the
complete copy operation is done inside the old current length of valid bytes in the
ToRawData variable.
Limitations
CopyRawBytes can not be used to copy some data from one rawbytes variable to other part
of the same rawbytes variable.
Syntax
CopyRawBytes
[FromRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[FromIndex ':=' ] < expression ( IN ) of num> ','
[ToRawData ':=' ] < variable ( VAR ) of rawbytes> ','
[ToIndex ':=' ] < expression ( IN ) of num>
['\'NoOfBytes ':=' < expression ( IN ) of num> ]';'
Continued
Continues on next page
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
69
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data on
page 940
Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data
on page 49
Pack DeviceNet header into
rawbytes data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page 725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page 352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes data
on page 658
Continued
1 Instructions
1.30. CorrClear - Removes all correction generators
Path Offset
3HAC 16581-1 Revision: J
70
© Copyright 2004-2010 ABB. All rights reserved.
1.30. CorrClear - Removes all correction generators
Descriptions
CorrClear is used to remove all connected correction generators. The instruction can be
used to remove all offsets provided earlier by all correction generators.
Basic examples
Basic examples of the instruction CorrClear are illustrated below.
Example 1
CorrClear;
The instruction removes all connected correction generators.
NOTE!
An easy way to ensure that all correction generators (with corrections) are removed at
program start, is to run CorrClear in a START event routine.
See Technical reference manual - System parameters , topic Controller .
Syntax
CorrClear ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 72
|
1 Instructions
1.29. CopyRawBytes - Copy the contents of rawbytes data
RobotWare - OS
69
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
rawbytes data
rawbytes - Raw data on page 1165
Get the length of rawbytes data
RawBytesLen - Get the length of rawbytes data on
page 940
Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data
on page 49
Pack DeviceNet header into
rawbytes data
PackDNHeader - Pack DeviceNet Header into
rawbytes data on page 287
Pack data into rawbytes data
PackRawBytes - Pack data into rawbytes data on
page 290
Write rawbytes data
WriteRawBytes - Write rawbytes data on page 725
Read rawbytes data
ReadRawBytes - Read rawbytes data on page 352
Unpack data from rawbytes data
UnpackRawBytes - Unpack data from rawbytes data
on page 658
Continued
1 Instructions
1.30. CorrClear - Removes all correction generators
Path Offset
3HAC 16581-1 Revision: J
70
© Copyright 2004-2010 ABB. All rights reserved.
1.30. CorrClear - Removes all correction generators
Descriptions
CorrClear is used to remove all connected correction generators. The instruction can be
used to remove all offsets provided earlier by all correction generators.
Basic examples
Basic examples of the instruction CorrClear are illustrated below.
Example 1
CorrClear;
The instruction removes all connected correction generators.
NOTE!
An easy way to ensure that all correction generators (with corrections) are removed at
program start, is to run CorrClear in a START event routine.
See Technical reference manual - System parameters , topic Controller .
Syntax
CorrClear ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
71
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.31. CorrCon - Connects to a correction generator
Usage
CorrCon is used to connect to a correction generator.
Basic examples
A basic example of the instruction CorrCon is illustrated below.
See also More examples on page 71 .
Example1
VAR corrdescr id;
...
CorrCon id;
The correction generator reference corresponds to the variable id reservation.
Arguments
CorrCon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
More examples of the instruction CorrCon are illustrated below.
Path coordinate system
All path corrections (offsets on the path) are added in the path coordinate system. The path
coordinate system is defined as illustrated below:
xx0500002156
•
Path coordinate axis X is given as the tangent of the path.
•
Path coordinate axis Y is derived as the cross product of tool coordinate axis Z and
path coordinate axis X.
•
Path coordinate axis Z is derived as the cross product of path coordinate axis X and
path coordinate axis Y.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 73
|
1 Instructions
1.30. CorrClear - Removes all correction generators
Path Offset
3HAC 16581-1 Revision: J
70
© Copyright 2004-2010 ABB. All rights reserved.
1.30. CorrClear - Removes all correction generators
Descriptions
CorrClear is used to remove all connected correction generators. The instruction can be
used to remove all offsets provided earlier by all correction generators.
Basic examples
Basic examples of the instruction CorrClear are illustrated below.
Example 1
CorrClear;
The instruction removes all connected correction generators.
NOTE!
An easy way to ensure that all correction generators (with corrections) are removed at
program start, is to run CorrClear in a START event routine.
See Technical reference manual - System parameters , topic Controller .
Syntax
CorrClear ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
71
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.31. CorrCon - Connects to a correction generator
Usage
CorrCon is used to connect to a correction generator.
Basic examples
A basic example of the instruction CorrCon is illustrated below.
See also More examples on page 71 .
Example1
VAR corrdescr id;
...
CorrCon id;
The correction generator reference corresponds to the variable id reservation.
Arguments
CorrCon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
More examples of the instruction CorrCon are illustrated below.
Path coordinate system
All path corrections (offsets on the path) are added in the path coordinate system. The path
coordinate system is defined as illustrated below:
xx0500002156
•
Path coordinate axis X is given as the tangent of the path.
•
Path coordinate axis Y is derived as the cross product of tool coordinate axis Z and
path coordinate axis X.
•
Path coordinate axis Z is derived as the cross product of path coordinate axis X and
path coordinate axis Y.
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
72
© Copyright 2004-2010 ABB. All rights reserved.
Application example
An example of an application using path corrections is a robot holding a tool with two sensors
mounted on it to detect the vertical and horizontal distances to a work object. The figure
below illustrates a path correction device.
xx0500002155
Program example
NOTE! hori_sig and vert_sig are analog signals defined in system
parameters.
CONST num TARGET_DIST := 5;
CONST num SCALE_FACTOR := 0.5;
VAR intnum intno1;
VAR corrdescr hori_id;
VAR corrdescr vert_id;
VAR pos total_offset;
VAR pos write_offset;
VAR bool conFlag;
PROC PathRoutine()
! Connect to the correction generators for horizontal and
vertical correction.
CorrCon hori_id;
CorrCon vert_id;
conFlag := TRUE;
! Setup a 5 Hz timer interrupt. The trap routine will read the
sensor values and
! compute the path corrections.
CONNECT intno1 WITH ReadSensors;
ITimer\Single, 0.2, intno1;
! Position for start of contour tracking
MoveJ p10,v100,z10,tool1;
! Run MoveL with both vertical and horizontal correction.
MoveL p20,v100,z10,tool1\Corr;
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 74
|
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
71
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.31. CorrCon - Connects to a correction generator
Usage
CorrCon is used to connect to a correction generator.
Basic examples
A basic example of the instruction CorrCon is illustrated below.
See also More examples on page 71 .
Example1
VAR corrdescr id;
...
CorrCon id;
The correction generator reference corresponds to the variable id reservation.
Arguments
CorrCon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
More examples of the instruction CorrCon are illustrated below.
Path coordinate system
All path corrections (offsets on the path) are added in the path coordinate system. The path
coordinate system is defined as illustrated below:
xx0500002156
•
Path coordinate axis X is given as the tangent of the path.
•
Path coordinate axis Y is derived as the cross product of tool coordinate axis Z and
path coordinate axis X.
•
Path coordinate axis Z is derived as the cross product of path coordinate axis X and
path coordinate axis Y.
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
72
© Copyright 2004-2010 ABB. All rights reserved.
Application example
An example of an application using path corrections is a robot holding a tool with two sensors
mounted on it to detect the vertical and horizontal distances to a work object. The figure
below illustrates a path correction device.
xx0500002155
Program example
NOTE! hori_sig and vert_sig are analog signals defined in system
parameters.
CONST num TARGET_DIST := 5;
CONST num SCALE_FACTOR := 0.5;
VAR intnum intno1;
VAR corrdescr hori_id;
VAR corrdescr vert_id;
VAR pos total_offset;
VAR pos write_offset;
VAR bool conFlag;
PROC PathRoutine()
! Connect to the correction generators for horizontal and
vertical correction.
CorrCon hori_id;
CorrCon vert_id;
conFlag := TRUE;
! Setup a 5 Hz timer interrupt. The trap routine will read the
sensor values and
! compute the path corrections.
CONNECT intno1 WITH ReadSensors;
ITimer\Single, 0.2, intno1;
! Position for start of contour tracking
MoveJ p10,v100,z10,tool1;
! Run MoveL with both vertical and horizontal correction.
MoveL p20,v100,z10,tool1\Corr;
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
73
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
! Read the total corrections added by all connected correction
generators.
total_offset := CorrRead();
! Write the total vertical correction on the FlexPendant.
TPWrite "The total vertical correction is:"
\Num:=total_offset.z;
! Disconnect the correction generator for vertical correction.
! Horizontal corrections will be unaffected.
CorrDiscon vert_id;
conFlag := FALSE;
! Run MoveL with only horizontal interrupt correction.
MoveL p30,v100,z10,tool1\Corr;
! Remove all outstanding connected correction generators.
! In this case, the only connected correction generator is the
one for horizontal
! correction.
CorrClear;
! Remove the timer interrupt.
IDelete intno1;
ENDPROC
TRAP ReadSensors
VAR num horiSig;
VAR num vertSig;
! Compute the horizontal correction values and execute the
correction.
horiSig := hori_sig;
write_offset.x := 0;
write_offset.y := (hori_sig - TARGET_DIST)*SCALE_FACTOR;
write_offset.z := 0;
CorrWrite hori_id, write_offset;
IF conFlag THEN
! Compute the vertical correction values and execute the
correction.
write_offset.x := 0;
write_offset.y := 0;
write_offset.z := (vert_sig - TARGET_DIST)*SCALE_FACTOR;
CorrWrite vert_id, write_offset;
ENDIF
!Setup interrupt again
IDelete intnol;
CONNECT intno1 WITH ReadSensors;
ITimer\single, 0.2, intno1;
ENDTRAP
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 75
|
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
72
© Copyright 2004-2010 ABB. All rights reserved.
Application example
An example of an application using path corrections is a robot holding a tool with two sensors
mounted on it to detect the vertical and horizontal distances to a work object. The figure
below illustrates a path correction device.
xx0500002155
Program example
NOTE! hori_sig and vert_sig are analog signals defined in system
parameters.
CONST num TARGET_DIST := 5;
CONST num SCALE_FACTOR := 0.5;
VAR intnum intno1;
VAR corrdescr hori_id;
VAR corrdescr vert_id;
VAR pos total_offset;
VAR pos write_offset;
VAR bool conFlag;
PROC PathRoutine()
! Connect to the correction generators for horizontal and
vertical correction.
CorrCon hori_id;
CorrCon vert_id;
conFlag := TRUE;
! Setup a 5 Hz timer interrupt. The trap routine will read the
sensor values and
! compute the path corrections.
CONNECT intno1 WITH ReadSensors;
ITimer\Single, 0.2, intno1;
! Position for start of contour tracking
MoveJ p10,v100,z10,tool1;
! Run MoveL with both vertical and horizontal correction.
MoveL p20,v100,z10,tool1\Corr;
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
73
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
! Read the total corrections added by all connected correction
generators.
total_offset := CorrRead();
! Write the total vertical correction on the FlexPendant.
TPWrite "The total vertical correction is:"
\Num:=total_offset.z;
! Disconnect the correction generator for vertical correction.
! Horizontal corrections will be unaffected.
CorrDiscon vert_id;
conFlag := FALSE;
! Run MoveL with only horizontal interrupt correction.
MoveL p30,v100,z10,tool1\Corr;
! Remove all outstanding connected correction generators.
! In this case, the only connected correction generator is the
one for horizontal
! correction.
CorrClear;
! Remove the timer interrupt.
IDelete intno1;
ENDPROC
TRAP ReadSensors
VAR num horiSig;
VAR num vertSig;
! Compute the horizontal correction values and execute the
correction.
horiSig := hori_sig;
write_offset.x := 0;
write_offset.y := (hori_sig - TARGET_DIST)*SCALE_FACTOR;
write_offset.z := 0;
CorrWrite hori_id, write_offset;
IF conFlag THEN
! Compute the vertical correction values and execute the
correction.
write_offset.x := 0;
write_offset.y := 0;
write_offset.z := (vert_sig - TARGET_DIST)*SCALE_FACTOR;
CorrWrite vert_id, write_offset;
ENDIF
!Setup interrupt again
IDelete intnol;
CONNECT intno1 WITH ReadSensors;
ITimer\single, 0.2, intno1;
ENDTRAP
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
74
© Copyright 2004-2010 ABB. All rights reserved.
Program explanation
Two correction generators are connected with the instruction CorrCon . Each correction
generator is referenced by a unique descriptor ( hori_id and vert_id ) of the type
corrdescr . The two sensors will use one correction generator each.
A timer interrupt is set up to call the trap routine ReadSensors with a frequency of 5 Hz.
The offsets, needed for path correction, are computed in the trap routine and written to the
corresponding correction generator (referenced by the descriptors hori_id and vert_id )
by the instruction CorrWrite . All the corrections will have immediate effect on the path.
The MoveL instruction must be programmed with the switch argument Corr when path
corrections are used. Otherwise, no corrections will be executed.
When the first MoveL instruction is ready, the function CorrRead is used to read the sum of
all the corrections (the total path correction) given by all the connected correction generators.
The result of the total vertical path correction is written to the FlexPendant with the
instruction TPWrite .
CorrDiscon will then disconnect the correction generator for vertical correction (referenced
by the descriptor vert_id ). All corrections added by this correction generator will be
removed from the total path correction. The corrections added by the correction generator for
horizontal correction will still be preserved.
Finally, the function CorrClear will remove all remaining connected correction generators
and their previously added corrections. In this case, it is only the correction generator for
horizontal correction that will be removed. The timer interrupt will also be removed by the
instruction IDelete .
The correction generators
The figure below illustrates the correction generators.
xx0500002160
Limitations
A maximum number of 5 correction generators can be connected simultaneously.
Connected Correction Generators do not survive a controller restart.
Syntax
CorrCon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 76
|
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
73
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
! Read the total corrections added by all connected correction
generators.
total_offset := CorrRead();
! Write the total vertical correction on the FlexPendant.
TPWrite "The total vertical correction is:"
\Num:=total_offset.z;
! Disconnect the correction generator for vertical correction.
! Horizontal corrections will be unaffected.
CorrDiscon vert_id;
conFlag := FALSE;
! Run MoveL with only horizontal interrupt correction.
MoveL p30,v100,z10,tool1\Corr;
! Remove all outstanding connected correction generators.
! In this case, the only connected correction generator is the
one for horizontal
! correction.
CorrClear;
! Remove the timer interrupt.
IDelete intno1;
ENDPROC
TRAP ReadSensors
VAR num horiSig;
VAR num vertSig;
! Compute the horizontal correction values and execute the
correction.
horiSig := hori_sig;
write_offset.x := 0;
write_offset.y := (hori_sig - TARGET_DIST)*SCALE_FACTOR;
write_offset.z := 0;
CorrWrite hori_id, write_offset;
IF conFlag THEN
! Compute the vertical correction values and execute the
correction.
write_offset.x := 0;
write_offset.y := 0;
write_offset.z := (vert_sig - TARGET_DIST)*SCALE_FACTOR;
CorrWrite vert_id, write_offset;
ENDIF
!Setup interrupt again
IDelete intnol;
CONNECT intno1 WITH ReadSensors;
ITimer\single, 0.2, intno1;
ENDTRAP
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
74
© Copyright 2004-2010 ABB. All rights reserved.
Program explanation
Two correction generators are connected with the instruction CorrCon . Each correction
generator is referenced by a unique descriptor ( hori_id and vert_id ) of the type
corrdescr . The two sensors will use one correction generator each.
A timer interrupt is set up to call the trap routine ReadSensors with a frequency of 5 Hz.
The offsets, needed for path correction, are computed in the trap routine and written to the
corresponding correction generator (referenced by the descriptors hori_id and vert_id )
by the instruction CorrWrite . All the corrections will have immediate effect on the path.
The MoveL instruction must be programmed with the switch argument Corr when path
corrections are used. Otherwise, no corrections will be executed.
When the first MoveL instruction is ready, the function CorrRead is used to read the sum of
all the corrections (the total path correction) given by all the connected correction generators.
The result of the total vertical path correction is written to the FlexPendant with the
instruction TPWrite .
CorrDiscon will then disconnect the correction generator for vertical correction (referenced
by the descriptor vert_id ). All corrections added by this correction generator will be
removed from the total path correction. The corrections added by the correction generator for
horizontal correction will still be preserved.
Finally, the function CorrClear will remove all remaining connected correction generators
and their previously added corrections. In this case, it is only the correction generator for
horizontal correction that will be removed. The timer interrupt will also be removed by the
instruction IDelete .
The correction generators
The figure below illustrates the correction generators.
xx0500002160
Limitations
A maximum number of 5 correction generators can be connected simultaneously.
Connected Correction Generators do not survive a controller restart.
Syntax
CorrCon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
75
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator
on page 77
Reads the current total offsets
CorrRead - Reads the current total offsets
on page 803
Removes all correction generators
CorrClear - Removes all correction
generators on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor
on page 1099
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 77
|
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
3HAC 16581-1 Revision: J
74
© Copyright 2004-2010 ABB. All rights reserved.
Program explanation
Two correction generators are connected with the instruction CorrCon . Each correction
generator is referenced by a unique descriptor ( hori_id and vert_id ) of the type
corrdescr . The two sensors will use one correction generator each.
A timer interrupt is set up to call the trap routine ReadSensors with a frequency of 5 Hz.
The offsets, needed for path correction, are computed in the trap routine and written to the
corresponding correction generator (referenced by the descriptors hori_id and vert_id )
by the instruction CorrWrite . All the corrections will have immediate effect on the path.
The MoveL instruction must be programmed with the switch argument Corr when path
corrections are used. Otherwise, no corrections will be executed.
When the first MoveL instruction is ready, the function CorrRead is used to read the sum of
all the corrections (the total path correction) given by all the connected correction generators.
The result of the total vertical path correction is written to the FlexPendant with the
instruction TPWrite .
CorrDiscon will then disconnect the correction generator for vertical correction (referenced
by the descriptor vert_id ). All corrections added by this correction generator will be
removed from the total path correction. The corrections added by the correction generator for
horizontal correction will still be preserved.
Finally, the function CorrClear will remove all remaining connected correction generators
and their previously added corrections. In this case, it is only the correction generator for
horizontal correction that will be removed. The timer interrupt will also be removed by the
instruction IDelete .
The correction generators
The figure below illustrates the correction generators.
xx0500002160
Limitations
A maximum number of 5 correction generators can be connected simultaneously.
Connected Correction Generators do not survive a controller restart.
Syntax
CorrCon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Continued
Continues on next page
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
75
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator
on page 77
Reads the current total offsets
CorrRead - Reads the current total offsets
on page 803
Removes all correction generators
CorrClear - Removes all correction
generators on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor
on page 1099
Continued
1 Instructions
1.32. CorrDiscon - Disconnects from a correction generator
Path Offset
3HAC 16581-1 Revision: J
76
© Copyright 2004-2010 ABB. All rights reserved.
1.32. CorrDiscon - Disconnects from a correction generator
Description
CorrDiscon is used to disconnect from a previously connected correction generator. The
instruction can be used to remove corrections given earlier.
Basic examples
A basic example of the instruction CorrDiscon is illustrated below.
See also More examples on page 76 .
Example 1
VAR corrdescr id;
...
CorrCon id;
...
CorrDiscon id;
CorrDiscon disconnects from the previously connected correction generator referenced by
the descriptor id.
Arguments
CorrDiscon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
For more examples of the instruction CorrDiscon, see CorrCon - Connects to a correction
generator on page 71 .
Syntax
CorrDiscon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators on
page 70
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 78
|
1 Instructions
1.31. CorrCon - Connects to a correction generator
Path Offset
75
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Writes to a correction generator
CorrWrite - Writes to a correction generator
on page 77
Reads the current total offsets
CorrRead - Reads the current total offsets
on page 803
Removes all correction generators
CorrClear - Removes all correction
generators on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor
on page 1099
Continued
1 Instructions
1.32. CorrDiscon - Disconnects from a correction generator
Path Offset
3HAC 16581-1 Revision: J
76
© Copyright 2004-2010 ABB. All rights reserved.
1.32. CorrDiscon - Disconnects from a correction generator
Description
CorrDiscon is used to disconnect from a previously connected correction generator. The
instruction can be used to remove corrections given earlier.
Basic examples
A basic example of the instruction CorrDiscon is illustrated below.
See also More examples on page 76 .
Example 1
VAR corrdescr id;
...
CorrCon id;
...
CorrDiscon id;
CorrDiscon disconnects from the previously connected correction generator referenced by
the descriptor id.
Arguments
CorrDiscon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
For more examples of the instruction CorrDiscon, see CorrCon - Connects to a correction
generator on page 71 .
Syntax
CorrDiscon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators on
page 70
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
77
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.33. CorrWrite - Writes to a correction generator
Description
CorrWrite is used to write offsets in the path coordinate system to a correction generator.
Basic examples
A basic example of the instruction CorrWrite is illustrated below.
Example 1
VAR corrdescr id;
VAR pos offset;
...
CorrWrite id, offset;
The current offsets, stored in the variable offset, are written to the correction generator
referenced by the descriptor id.
Arguments
CorrWrite Descr Data
Descr
Data type: corrdescr
Descriptor of the correction generator.
Data
Data type: pos
The offset to be written.
More examples
For more examples of the instruction CorrWrite, see CorrCon - Connects to a correction
generator on page 71 .
Limitations
The best performance is achieved on straight paths. As the speed and angles between
consecutive linear paths increase, the deviation from the expected path will also increase. The
same applies to circles with decreasing circle radius.
Syntax
CorrWrite
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ','
[ Data ':=' ] < expression ( IN ) of pos > ';'
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 79
|
1 Instructions
1.32. CorrDiscon - Disconnects from a correction generator
Path Offset
3HAC 16581-1 Revision: J
76
© Copyright 2004-2010 ABB. All rights reserved.
1.32. CorrDiscon - Disconnects from a correction generator
Description
CorrDiscon is used to disconnect from a previously connected correction generator. The
instruction can be used to remove corrections given earlier.
Basic examples
A basic example of the instruction CorrDiscon is illustrated below.
See also More examples on page 76 .
Example 1
VAR corrdescr id;
...
CorrCon id;
...
CorrDiscon id;
CorrDiscon disconnects from the previously connected correction generator referenced by
the descriptor id.
Arguments
CorrDiscon Descr
Descr
Data type: corrdescr
Descriptor of the correction generator.
More examples
For more examples of the instruction CorrDiscon, see CorrCon - Connects to a correction
generator on page 71 .
Syntax
CorrDiscon
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ';'
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Writes to a correction generator
CorrWrite - Writes to a correction generator on
page 77
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators on
page 70
Correction descriptor
corrdescr - Correction generator descriptor on
page 1099
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
77
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.33. CorrWrite - Writes to a correction generator
Description
CorrWrite is used to write offsets in the path coordinate system to a correction generator.
Basic examples
A basic example of the instruction CorrWrite is illustrated below.
Example 1
VAR corrdescr id;
VAR pos offset;
...
CorrWrite id, offset;
The current offsets, stored in the variable offset, are written to the correction generator
referenced by the descriptor id.
Arguments
CorrWrite Descr Data
Descr
Data type: corrdescr
Descriptor of the correction generator.
Data
Data type: pos
The offset to be written.
More examples
For more examples of the instruction CorrWrite, see CorrCon - Connects to a correction
generator on page 71 .
Limitations
The best performance is achieved on straight paths. As the speed and angles between
consecutive linear paths increase, the deviation from the expected path will also increase. The
same applies to circles with decreasing circle radius.
Syntax
CorrWrite
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ','
[ Data ':=' ] < expression ( IN ) of pos > ';'
Continues on next page
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
3HAC 16581-1 Revision: J
78
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators
on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor on
page 1099
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 80
|
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
77
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.33. CorrWrite - Writes to a correction generator
Description
CorrWrite is used to write offsets in the path coordinate system to a correction generator.
Basic examples
A basic example of the instruction CorrWrite is illustrated below.
Example 1
VAR corrdescr id;
VAR pos offset;
...
CorrWrite id, offset;
The current offsets, stored in the variable offset, are written to the correction generator
referenced by the descriptor id.
Arguments
CorrWrite Descr Data
Descr
Data type: corrdescr
Descriptor of the correction generator.
Data
Data type: pos
The offset to be written.
More examples
For more examples of the instruction CorrWrite, see CorrCon - Connects to a correction
generator on page 71 .
Limitations
The best performance is achieved on straight paths. As the speed and angles between
consecutive linear paths increase, the deviation from the expected path will also increase. The
same applies to circles with decreasing circle radius.
Syntax
CorrWrite
[ Descr ':=' ] < variable ( VAR ) of corrdescr > ','
[ Data ':=' ] < expression ( IN ) of pos > ';'
Continues on next page
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
3HAC 16581-1 Revision: J
78
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators
on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor on
page 1099
Continued
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
79
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.34. DeactUnit - Deactivates a mechanical unit
Usage
DeactUnit is used to deactivate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Examples
Basic examples of the instruction DeactUnit are illustrated below.
Example 1
DeactUnit orbit_a;
Deactivation of the orbit_a mechanical unit.
Example 2
MoveL p10, v100, fine, tool1;
DeactUnit track_motion;
MoveL p20, v100, z10, tool1;
MoveL p30, v100, fine, tool1;
ActUnit track_motion;
MoveL p40, v100, z10, tool1;
The unit track_motion will be stationary when the robot moves to p20 and p30 . After this,
both the robot and track_motio n will move to p40 .
Example 3
MoveL p10, v100, fine, tool1;
DeactUnit orbit1;
ActUnit orbit2;
MoveL p20, v100, z10, tool1;
The unit orbit1 is deactivated and orbit2 is activated.
Arguments
DeactUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be deactivated.
Program execution
When the robot’s and external axes’ actual path is ready, the path on current path level is
cleared and the specified mechanical unit is deactivated. This means that it will neither be
controlled nor monitored until it is re-activated.
If several mechanical units share a common drive unit, deactivation of one of the mechanical
units will also disconnect that unit from the common drive unit.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 81
|
1 Instructions
1.33. CorrWrite - Writes to a correction generator
Path Offset
3HAC 16581-1 Revision: J
78
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Connects to a correction generator
CorrCon - Connects to a correction generator on
page 71
Disconnects from a correction generator
CorrDiscon - Disconnects from a correction
generator on page 76
Reads the current total offsets
CorrRead - Reads the current total offsets on
page 803
Removes all correction generators
CorrClear - Removes all correction generators
on page 70
Correction generator descriptor
corrdescr - Correction generator descriptor on
page 1099
Continued
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
79
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.34. DeactUnit - Deactivates a mechanical unit
Usage
DeactUnit is used to deactivate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Examples
Basic examples of the instruction DeactUnit are illustrated below.
Example 1
DeactUnit orbit_a;
Deactivation of the orbit_a mechanical unit.
Example 2
MoveL p10, v100, fine, tool1;
DeactUnit track_motion;
MoveL p20, v100, z10, tool1;
MoveL p30, v100, fine, tool1;
ActUnit track_motion;
MoveL p40, v100, z10, tool1;
The unit track_motion will be stationary when the robot moves to p20 and p30 . After this,
both the robot and track_motio n will move to p40 .
Example 3
MoveL p10, v100, fine, tool1;
DeactUnit orbit1;
ActUnit orbit2;
MoveL p20, v100, z10, tool1;
The unit orbit1 is deactivated and orbit2 is activated.
Arguments
DeactUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be deactivated.
Program execution
When the robot’s and external axes’ actual path is ready, the path on current path level is
cleared and the specified mechanical unit is deactivated. This means that it will neither be
controlled nor monitored until it is re-activated.
If several mechanical units share a common drive unit, deactivation of one of the mechanical
units will also disconnect that unit from the common drive unit.
Continues on next page
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
80
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
Instruction DeactUnit cannot be used when one of the mechanical unit is in independent
mode.
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
DeactUnit cannot be executed in a RAPID routine connected to any of following special
system events: PowerOn, Stop, QStop, Restart or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. If such
operation the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
DeactUnit
[MechUnit ':='] < variable ( VAR ) of mecunit > ';'
Related information
For information about
See
Activating mechanical units
ActUnit - Activates a mechanical unit on page 17
Mechanical units
mecunit - Mechanical unit on page 1139
Path Recorder
PathRecMoveBwd - Move path recorder
backwards on page 298
mecunit - Mechanical unit on page 1139
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 82
|
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
79
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.34. DeactUnit - Deactivates a mechanical unit
Usage
DeactUnit is used to deactivate a mechanical unit.
It can be used to determine which unit is to be active when, for example, common drive units
are used.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Examples
Basic examples of the instruction DeactUnit are illustrated below.
Example 1
DeactUnit orbit_a;
Deactivation of the orbit_a mechanical unit.
Example 2
MoveL p10, v100, fine, tool1;
DeactUnit track_motion;
MoveL p20, v100, z10, tool1;
MoveL p30, v100, fine, tool1;
ActUnit track_motion;
MoveL p40, v100, z10, tool1;
The unit track_motion will be stationary when the robot moves to p20 and p30 . After this,
both the robot and track_motio n will move to p40 .
Example 3
MoveL p10, v100, fine, tool1;
DeactUnit orbit1;
ActUnit orbit2;
MoveL p20, v100, z10, tool1;
The unit orbit1 is deactivated and orbit2 is activated.
Arguments
DeactUnit MechUnit
MechUnit
Mechanical Unit
Data type: mecunit
The name of the mechanical unit that is to be deactivated.
Program execution
When the robot’s and external axes’ actual path is ready, the path on current path level is
cleared and the specified mechanical unit is deactivated. This means that it will neither be
controlled nor monitored until it is re-activated.
If several mechanical units share a common drive unit, deactivation of one of the mechanical
units will also disconnect that unit from the common drive unit.
Continues on next page
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
80
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
Instruction DeactUnit cannot be used when one of the mechanical unit is in independent
mode.
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
DeactUnit cannot be executed in a RAPID routine connected to any of following special
system events: PowerOn, Stop, QStop, Restart or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. If such
operation the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
DeactUnit
[MechUnit ':='] < variable ( VAR ) of mecunit > ';'
Related information
For information about
See
Activating mechanical units
ActUnit - Activates a mechanical unit on page 17
Mechanical units
mecunit - Mechanical unit on page 1139
Path Recorder
PathRecMoveBwd - Move path recorder
backwards on page 298
mecunit - Mechanical unit on page 1139
Continued
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
81
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.35. Decr - Decrements by 1
Usage
Decr is used to subtract 1 from a numeric variable or persistent.
Basic examples
A basic example of the instruction Decr is illustrated below.
See also More examples on page 81 .
Example 1
Decr reg1;
1 is subtracted from reg1 , that is reg1:=reg1-1 .
Arguments
Decr Name | Dname
Name
Data type: num
The name of the variable or persistent to be decremented.
Dname
Data type: dnum
The name of the variable or persistent to be decremented.
More examples
More examples of the instruction Decr are illustrated below.
Example 1
VAR num no_of_parts:=0;
...
TPReadNum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Example 2
VAR dnum no_of_parts:=0;
...
TPReadDnum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 83
|
1 Instructions
1.34. DeactUnit - Deactivates a mechanical unit
RobotWare - OS
3HAC 16581-1 Revision: J
80
© Copyright 2004-2010 ABB. All rights reserved.
Limitations
Instruction DeactUnit cannot be used when one of the mechanical unit is in independent
mode.
If this instruction is preceded by a move instruction, that move instruction must be
programmed with a stop point (zonedata fine ), not a fly-by point, otherwise restart after
power failure will not be possible.
DeactUnit cannot be executed in a RAPID routine connected to any of following special
system events: PowerOn, Stop, QStop, Restart or Step.
It is possible to use ActUnit - DeactUnit on StorePath level, but the same mechanical
units must be active when doing RestoPath as when StorePath was done. If such
operation the Path Recorder and the path on the base level will be intact, but the path on the
StorePath level will be cleared.
Syntax
DeactUnit
[MechUnit ':='] < variable ( VAR ) of mecunit > ';'
Related information
For information about
See
Activating mechanical units
ActUnit - Activates a mechanical unit on page 17
Mechanical units
mecunit - Mechanical unit on page 1139
Path Recorder
PathRecMoveBwd - Move path recorder
backwards on page 298
mecunit - Mechanical unit on page 1139
Continued
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
81
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.35. Decr - Decrements by 1
Usage
Decr is used to subtract 1 from a numeric variable or persistent.
Basic examples
A basic example of the instruction Decr is illustrated below.
See also More examples on page 81 .
Example 1
Decr reg1;
1 is subtracted from reg1 , that is reg1:=reg1-1 .
Arguments
Decr Name | Dname
Name
Data type: num
The name of the variable or persistent to be decremented.
Dname
Data type: dnum
The name of the variable or persistent to be decremented.
More examples
More examples of the instruction Decr are illustrated below.
Example 1
VAR num no_of_parts:=0;
...
TPReadNum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Example 2
VAR dnum no_of_parts:=0;
...
TPReadDnum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Continues on next page
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
3HAC 16581-1 Revision: J
82
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
Decr
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum >' ;'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Subtracting any value from a variable
Add - Adds a numeric value on page 19
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 84
|
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
81
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.35. Decr - Decrements by 1
Usage
Decr is used to subtract 1 from a numeric variable or persistent.
Basic examples
A basic example of the instruction Decr is illustrated below.
See also More examples on page 81 .
Example 1
Decr reg1;
1 is subtracted from reg1 , that is reg1:=reg1-1 .
Arguments
Decr Name | Dname
Name
Data type: num
The name of the variable or persistent to be decremented.
Dname
Data type: dnum
The name of the variable or persistent to be decremented.
More examples
More examples of the instruction Decr are illustrated below.
Example 1
VAR num no_of_parts:=0;
...
TPReadNum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Example 2
VAR dnum no_of_parts:=0;
...
TPReadDnum no_of_parts, "How many parts should be produced? ";
WHILE no_of_parts>0 DO
produce_part;
Decr no_of_parts;
ENDWHILE
The operator is asked to input the number of parts to be produced. The variable
no_of_parts is used to count the number that still have to be produced.
Continues on next page
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
3HAC 16581-1 Revision: J
82
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
Decr
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum >' ;'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Subtracting any value from a variable
Add - Adds a numeric value on page 19
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
83
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.36. DitherAct - Enables dither for soft servo
Usage
DitherAct is used to enable the dither functionality, which will reduce the friction in soft
servo for IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction DitherAct are illustrated below.
Example 1
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 2;
DitherAct \MechUnit:=ROB_1, 2;
WaitTime 1;
DitherDeact;
SoftDeact;
Dither is enabled only for one second while in soft servo.
Example 2
DitherAct \MechUnit:=ROB_1, 2;
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 1;
MoveL p1, v50, z20, tool1;
SoftDeact;
DitherDeact;
Dither is enabled for axis 2. Movement is delayed for one second to allow sufficient transition
time for the SoftAct ramp. If DitherAct is called before SoftAct , dither will start
whenever a SoftAct is executed for that axis. If no DitherDeact is called, dither will stay
enabled for all subsequent SoftAct calls.
Arguments
DitherAct [\MechUnit] Axis [\Level]
[ \MechUnit ]
Mechanical Unit
Data type: mecunit
The name of the mechanical unit. If argument is omitted, it means activation of the soft servo
for specified robot axis.
Axis
Data type: num
Axis number (1-6).
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 85
|
1 Instructions
1.35. Decr - Decrements by 1
RobotWare - OS
3HAC 16581-1 Revision: J
82
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
Decr
[ Name ':=' ] < var or pers ( INOUT ) of num >
| [ Dname ':=' ] < var or pers ( INOUT ) of dnum >' ;'
Related information
For information about
See
Incrementing a variable by 1
Incr - Increments by 1 on page 131
Subtracting any value from a variable
Add - Adds a numeric value on page 19
Changing data using an arbitrary
expression, e.g. multiplication
":=" - Assigns a value on page 24
Continued
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
83
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.36. DitherAct - Enables dither for soft servo
Usage
DitherAct is used to enable the dither functionality, which will reduce the friction in soft
servo for IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction DitherAct are illustrated below.
Example 1
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 2;
DitherAct \MechUnit:=ROB_1, 2;
WaitTime 1;
DitherDeact;
SoftDeact;
Dither is enabled only for one second while in soft servo.
Example 2
DitherAct \MechUnit:=ROB_1, 2;
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 1;
MoveL p1, v50, z20, tool1;
SoftDeact;
DitherDeact;
Dither is enabled for axis 2. Movement is delayed for one second to allow sufficient transition
time for the SoftAct ramp. If DitherAct is called before SoftAct , dither will start
whenever a SoftAct is executed for that axis. If no DitherDeact is called, dither will stay
enabled for all subsequent SoftAct calls.
Arguments
DitherAct [\MechUnit] Axis [\Level]
[ \MechUnit ]
Mechanical Unit
Data type: mecunit
The name of the mechanical unit. If argument is omitted, it means activation of the soft servo
for specified robot axis.
Axis
Data type: num
Axis number (1-6).
Continues on next page
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
3HAC 16581-1 Revision: J
84
© Copyright 2004-2010 ABB. All rights reserved.
[ \Level ]
Data type: num
Amplitude of dither (50-150%). At 50%, oscillations are reduced (increased friction). At
150%, amplitude is maximum (may result in vibrations of endeffector). The default value is
100%.
Program execution
DitherAct can be called before, or after SoftAct . Calling DitherAct after SoftAct is
faster but it has other limitations.
Dither is usually not required for axis 1 of IRB 7600. Highest effect of friction reduction is
on axes 2 and 3.
Dither parameters are self-adjusting. Full dither performance is achieved after three or four
executions of SoftAct in process position.
Limitations
Calling DitherAct after SoftAct may cause unwanted movement of the robot. The only
way to eliminate this behavior is to call DitherAct before SoftAct . If there still is
movement, SoftAct ramp time should be increased.
The transition time is the ramp time, which varies between robots, multiplied with the ramp
factor of the SoftAct -instruction.
Dithering is not available for axis 6.
Dither is always deactivated when there is a power failure.
The instruction is only to be used for IRB 7600.
WARNING!
When calling DitherAct before SoftAct the robot must be in a fine point . Also, leaving
the fine point is not permitted until the transition time of the ramp is over. This might
damage the gear boxes .
Syntax
DitherAct
[ '\' MechUnit ':=' < variable ( VAR ) of mecunit > ]
[Axis ':=' ] < expression ( IN ) of num >
[ '\' Level ':=' < expression ( IN ) of num > ] ';'
Related information
For information about
See
Activating Soft Servo
SoftAct - Activating the soft servo on page 473
Behavior with the soft servo engaged
Technical reference manual - RAPID overview
Disable of dither
DitherDeact - Disables dither for soft servo on
page 85
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 86
|
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
83
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.36. DitherAct - Enables dither for soft servo
Usage
DitherAct is used to enable the dither functionality, which will reduce the friction in soft
servo for IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction DitherAct are illustrated below.
Example 1
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 2;
DitherAct \MechUnit:=ROB_1, 2;
WaitTime 1;
DitherDeact;
SoftDeact;
Dither is enabled only for one second while in soft servo.
Example 2
DitherAct \MechUnit:=ROB_1, 2;
SoftAct \MechUnit:=ROB_1, 2, 100;
WaitTime 1;
MoveL p1, v50, z20, tool1;
SoftDeact;
DitherDeact;
Dither is enabled for axis 2. Movement is delayed for one second to allow sufficient transition
time for the SoftAct ramp. If DitherAct is called before SoftAct , dither will start
whenever a SoftAct is executed for that axis. If no DitherDeact is called, dither will stay
enabled for all subsequent SoftAct calls.
Arguments
DitherAct [\MechUnit] Axis [\Level]
[ \MechUnit ]
Mechanical Unit
Data type: mecunit
The name of the mechanical unit. If argument is omitted, it means activation of the soft servo
for specified robot axis.
Axis
Data type: num
Axis number (1-6).
Continues on next page
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
3HAC 16581-1 Revision: J
84
© Copyright 2004-2010 ABB. All rights reserved.
[ \Level ]
Data type: num
Amplitude of dither (50-150%). At 50%, oscillations are reduced (increased friction). At
150%, amplitude is maximum (may result in vibrations of endeffector). The default value is
100%.
Program execution
DitherAct can be called before, or after SoftAct . Calling DitherAct after SoftAct is
faster but it has other limitations.
Dither is usually not required for axis 1 of IRB 7600. Highest effect of friction reduction is
on axes 2 and 3.
Dither parameters are self-adjusting. Full dither performance is achieved after three or four
executions of SoftAct in process position.
Limitations
Calling DitherAct after SoftAct may cause unwanted movement of the robot. The only
way to eliminate this behavior is to call DitherAct before SoftAct . If there still is
movement, SoftAct ramp time should be increased.
The transition time is the ramp time, which varies between robots, multiplied with the ramp
factor of the SoftAct -instruction.
Dithering is not available for axis 6.
Dither is always deactivated when there is a power failure.
The instruction is only to be used for IRB 7600.
WARNING!
When calling DitherAct before SoftAct the robot must be in a fine point . Also, leaving
the fine point is not permitted until the transition time of the ramp is over. This might
damage the gear boxes .
Syntax
DitherAct
[ '\' MechUnit ':=' < variable ( VAR ) of mecunit > ]
[Axis ':=' ] < expression ( IN ) of num >
[ '\' Level ':=' < expression ( IN ) of num > ] ';'
Related information
For information about
See
Activating Soft Servo
SoftAct - Activating the soft servo on page 473
Behavior with the soft servo engaged
Technical reference manual - RAPID overview
Disable of dither
DitherDeact - Disables dither for soft servo on
page 85
Continued
1 Instructions
1.37. DitherDeact - Disables dither for soft servo
RobotWare - OS
85
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.37. DitherDeact - Disables dither for soft servo
Usage
DitherDeact is used to disable the dither functionality for soft servo of IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction DitherDeact is illustrated below.
Example 1
DitherDeact;
Deactivates dither on all axis.
Program execution
DitherDeact can be used at any time. If in soft servo, dither stops immediately on all axes.
If not in soft servo, dither will not be active when next SoftAct is executed.
The dither is automatically disabled
•
at a cold start-up
•
when a new program is loaded
•
when starting program execution from the beginning.
Syntax
DitherDeact';'
Related information
For information about
See
Activating dither
DitherAct - Enables dither for soft servo on page
83
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 87
|
1 Instructions
1.36. DitherAct - Enables dither for soft servo
RobotWare - OS
3HAC 16581-1 Revision: J
84
© Copyright 2004-2010 ABB. All rights reserved.
[ \Level ]
Data type: num
Amplitude of dither (50-150%). At 50%, oscillations are reduced (increased friction). At
150%, amplitude is maximum (may result in vibrations of endeffector). The default value is
100%.
Program execution
DitherAct can be called before, or after SoftAct . Calling DitherAct after SoftAct is
faster but it has other limitations.
Dither is usually not required for axis 1 of IRB 7600. Highest effect of friction reduction is
on axes 2 and 3.
Dither parameters are self-adjusting. Full dither performance is achieved after three or four
executions of SoftAct in process position.
Limitations
Calling DitherAct after SoftAct may cause unwanted movement of the robot. The only
way to eliminate this behavior is to call DitherAct before SoftAct . If there still is
movement, SoftAct ramp time should be increased.
The transition time is the ramp time, which varies between robots, multiplied with the ramp
factor of the SoftAct -instruction.
Dithering is not available for axis 6.
Dither is always deactivated when there is a power failure.
The instruction is only to be used for IRB 7600.
WARNING!
When calling DitherAct before SoftAct the robot must be in a fine point . Also, leaving
the fine point is not permitted until the transition time of the ramp is over. This might
damage the gear boxes .
Syntax
DitherAct
[ '\' MechUnit ':=' < variable ( VAR ) of mecunit > ]
[Axis ':=' ] < expression ( IN ) of num >
[ '\' Level ':=' < expression ( IN ) of num > ] ';'
Related information
For information about
See
Activating Soft Servo
SoftAct - Activating the soft servo on page 473
Behavior with the soft servo engaged
Technical reference manual - RAPID overview
Disable of dither
DitherDeact - Disables dither for soft servo on
page 85
Continued
1 Instructions
1.37. DitherDeact - Disables dither for soft servo
RobotWare - OS
85
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.37. DitherDeact - Disables dither for soft servo
Usage
DitherDeact is used to disable the dither functionality for soft servo of IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction DitherDeact is illustrated below.
Example 1
DitherDeact;
Deactivates dither on all axis.
Program execution
DitherDeact can be used at any time. If in soft servo, dither stops immediately on all axes.
If not in soft servo, dither will not be active when next SoftAct is executed.
The dither is automatically disabled
•
at a cold start-up
•
when a new program is loaded
•
when starting program execution from the beginning.
Syntax
DitherDeact';'
Related information
For information about
See
Activating dither
DitherAct - Enables dither for soft servo on page
83
1 Instructions
1.38. DropWObj - Drop work object on conveyor
Conveyor Tracking
3HAC 16581-1 Revision: J
86
© Copyright 2004-2010 ABB. All rights reserved.
1.38. DropWObj - Drop work object on conveyor
Usage
DropWObj ( Drop Work Object ) is used to disconnect from the current object and the program
is ready for the next object on the conveyor.
Basic examples
A basic example of the instruction DropWObj is illustrated below.
Example 1
MoveL *, v1000, z10, tool, \WObj:=wobj_on_cnv1;
MoveL *, v1000, fine, tool, \WObj:=wobj0;
DropWObj wobj_on_cnv1;
MoveL *, v1000, z10, tool, \WObj:=wobj0;
Arguments
DropWObj WObj
WObj
Work Object
Data type: wobjdata
The moving work object (coordinate system) to which the robot position in the instruction is
related. The mechanical unit conveyor is to be specified by the ufmec in the work object.
Program execution
Dropping the work object means that the encoder unit no longer tracks the object. The object
is removed from the object queue and cannot be recovered.
Limitations
If the instruction is issued while the robot is actively using the conveyor coordinated work
object, then the motion stops.
The instruction may be issued only after a fixed work object has been used in the preceding
motion instructions with either a fine point or several (>1) corner zones.
Syntax
DropWObj
[ WObj ':='] < persistent ( PERS ) of wobjdata>';'
Related information
For information about
See
Wait for work objects
WaitWObj - Wait for work object on conveyor on
page 701
Conveyor tracking
Application manual - Conveyor tracking
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 88
|
1 Instructions
1.37. DitherDeact - Disables dither for soft servo
RobotWare - OS
85
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.37. DitherDeact - Disables dither for soft servo
Usage
DitherDeact is used to disable the dither functionality for soft servo of IRB 7600.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction DitherDeact is illustrated below.
Example 1
DitherDeact;
Deactivates dither on all axis.
Program execution
DitherDeact can be used at any time. If in soft servo, dither stops immediately on all axes.
If not in soft servo, dither will not be active when next SoftAct is executed.
The dither is automatically disabled
•
at a cold start-up
•
when a new program is loaded
•
when starting program execution from the beginning.
Syntax
DitherDeact';'
Related information
For information about
See
Activating dither
DitherAct - Enables dither for soft servo on page
83
1 Instructions
1.38. DropWObj - Drop work object on conveyor
Conveyor Tracking
3HAC 16581-1 Revision: J
86
© Copyright 2004-2010 ABB. All rights reserved.
1.38. DropWObj - Drop work object on conveyor
Usage
DropWObj ( Drop Work Object ) is used to disconnect from the current object and the program
is ready for the next object on the conveyor.
Basic examples
A basic example of the instruction DropWObj is illustrated below.
Example 1
MoveL *, v1000, z10, tool, \WObj:=wobj_on_cnv1;
MoveL *, v1000, fine, tool, \WObj:=wobj0;
DropWObj wobj_on_cnv1;
MoveL *, v1000, z10, tool, \WObj:=wobj0;
Arguments
DropWObj WObj
WObj
Work Object
Data type: wobjdata
The moving work object (coordinate system) to which the robot position in the instruction is
related. The mechanical unit conveyor is to be specified by the ufmec in the work object.
Program execution
Dropping the work object means that the encoder unit no longer tracks the object. The object
is removed from the object queue and cannot be recovered.
Limitations
If the instruction is issued while the robot is actively using the conveyor coordinated work
object, then the motion stops.
The instruction may be issued only after a fixed work object has been used in the preceding
motion instructions with either a fine point or several (>1) corner zones.
Syntax
DropWObj
[ WObj ':='] < persistent ( PERS ) of wobjdata>';'
Related information
For information about
See
Wait for work objects
WaitWObj - Wait for work object on conveyor on
page 701
Conveyor tracking
Application manual - Conveyor tracking
1 Instructions
1.39. EOffsOff - Deactivates an offset for external axes
RobotWare - OS
87
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.39. EOffsOff - Deactivates an offset for external axes
Usage
EOffsOff ( External Offset Off ) is used to deactivate an offset for external axes.
The offset for external axes is activated by the instruction EOffsSet or EOffsOn and applies
to all movements until some other offset for external axes is activated or until the offset for
external axes is deactivated.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOff are illustrated below.
Example 1
EOffsOff;
Deactivation of the offset for external axes.
Example 2
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p11;
MoveL p20, v500, z10, tool1;
MoveL p30, v500, z10, tool1;
EOffsOff;
MoveL p40, v500, z10, tool1;
An offset is defined as the difference between the position of each axis at p10 and p11 . This
displacement affects the movement to p20 and p30 , but not to p40 .
Program execution
Active offsets for external axes are reset.
Syntax
EOffsOff ';'
Related information
For information about
See
Definition of offset using two positions
EOffsOn - Activates an offset for external axes on
page 88
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Deactivation of the robot’s program dis-
placement
PDispOff - Deactivates program displacement on
page 316
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 89
|
1 Instructions
1.38. DropWObj - Drop work object on conveyor
Conveyor Tracking
3HAC 16581-1 Revision: J
86
© Copyright 2004-2010 ABB. All rights reserved.
1.38. DropWObj - Drop work object on conveyor
Usage
DropWObj ( Drop Work Object ) is used to disconnect from the current object and the program
is ready for the next object on the conveyor.
Basic examples
A basic example of the instruction DropWObj is illustrated below.
Example 1
MoveL *, v1000, z10, tool, \WObj:=wobj_on_cnv1;
MoveL *, v1000, fine, tool, \WObj:=wobj0;
DropWObj wobj_on_cnv1;
MoveL *, v1000, z10, tool, \WObj:=wobj0;
Arguments
DropWObj WObj
WObj
Work Object
Data type: wobjdata
The moving work object (coordinate system) to which the robot position in the instruction is
related. The mechanical unit conveyor is to be specified by the ufmec in the work object.
Program execution
Dropping the work object means that the encoder unit no longer tracks the object. The object
is removed from the object queue and cannot be recovered.
Limitations
If the instruction is issued while the robot is actively using the conveyor coordinated work
object, then the motion stops.
The instruction may be issued only after a fixed work object has been used in the preceding
motion instructions with either a fine point or several (>1) corner zones.
Syntax
DropWObj
[ WObj ':='] < persistent ( PERS ) of wobjdata>';'
Related information
For information about
See
Wait for work objects
WaitWObj - Wait for work object on conveyor on
page 701
Conveyor tracking
Application manual - Conveyor tracking
1 Instructions
1.39. EOffsOff - Deactivates an offset for external axes
RobotWare - OS
87
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.39. EOffsOff - Deactivates an offset for external axes
Usage
EOffsOff ( External Offset Off ) is used to deactivate an offset for external axes.
The offset for external axes is activated by the instruction EOffsSet or EOffsOn and applies
to all movements until some other offset for external axes is activated or until the offset for
external axes is deactivated.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOff are illustrated below.
Example 1
EOffsOff;
Deactivation of the offset for external axes.
Example 2
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p11;
MoveL p20, v500, z10, tool1;
MoveL p30, v500, z10, tool1;
EOffsOff;
MoveL p40, v500, z10, tool1;
An offset is defined as the difference between the position of each axis at p10 and p11 . This
displacement affects the movement to p20 and p30 , but not to p40 .
Program execution
Active offsets for external axes are reset.
Syntax
EOffsOff ';'
Related information
For information about
See
Definition of offset using two positions
EOffsOn - Activates an offset for external axes on
page 88
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Deactivation of the robot’s program dis-
placement
PDispOff - Deactivates program displacement on
page 316
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
3HAC 16581-1 Revision: J
88
© Copyright 2004-2010 ABB. All rights reserved.
1.40. EOffsOn - Activates an offset for external axes
Usage
EOffsOn ( External Offset On ) is used to define and activate an offset for external axes using
two positions.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOn are illustrated below.
See also More examples on page 89 .
Example 1
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p20;
Activation of an offset for external axes. This is calculated for each axis based on the
difference between positions p10 and p20 .
Example 2
MoveL p10, v500, fine \Inpos := inpos50, tool1;
EOffsOn *;
Activation of an offset for external axes. Since a stop point that is accurately defined has been
used in the previous instruction, the argument \ExeP does not have to be used. The
displacement is calculated on the basis of the difference between the actual position of each
axis and the programmed point (*) stored in the instruction.
Arguments
EOffsOn [\ExeP] ProgPoint
[ \ExeP ]
Executed Point
Data type: robtarget
The new position, used for calculation of the offset. If this argument is omitted, the current
position of the axes at the time of the program execution is used.
ProgPoint
Programmed Point
Data type: robtarget
The original position of the axes at the time of programming.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 90
|
1 Instructions
1.39. EOffsOff - Deactivates an offset for external axes
RobotWare - OS
87
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.39. EOffsOff - Deactivates an offset for external axes
Usage
EOffsOff ( External Offset Off ) is used to deactivate an offset for external axes.
The offset for external axes is activated by the instruction EOffsSet or EOffsOn and applies
to all movements until some other offset for external axes is activated or until the offset for
external axes is deactivated.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOff are illustrated below.
Example 1
EOffsOff;
Deactivation of the offset for external axes.
Example 2
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p11;
MoveL p20, v500, z10, tool1;
MoveL p30, v500, z10, tool1;
EOffsOff;
MoveL p40, v500, z10, tool1;
An offset is defined as the difference between the position of each axis at p10 and p11 . This
displacement affects the movement to p20 and p30 , but not to p40 .
Program execution
Active offsets for external axes are reset.
Syntax
EOffsOff ';'
Related information
For information about
See
Definition of offset using two positions
EOffsOn - Activates an offset for external axes on
page 88
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Deactivation of the robot’s program dis-
placement
PDispOff - Deactivates program displacement on
page 316
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
3HAC 16581-1 Revision: J
88
© Copyright 2004-2010 ABB. All rights reserved.
1.40. EOffsOn - Activates an offset for external axes
Usage
EOffsOn ( External Offset On ) is used to define and activate an offset for external axes using
two positions.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOn are illustrated below.
See also More examples on page 89 .
Example 1
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p20;
Activation of an offset for external axes. This is calculated for each axis based on the
difference between positions p10 and p20 .
Example 2
MoveL p10, v500, fine \Inpos := inpos50, tool1;
EOffsOn *;
Activation of an offset for external axes. Since a stop point that is accurately defined has been
used in the previous instruction, the argument \ExeP does not have to be used. The
displacement is calculated on the basis of the difference between the actual position of each
axis and the programmed point (*) stored in the instruction.
Arguments
EOffsOn [\ExeP] ProgPoint
[ \ExeP ]
Executed Point
Data type: robtarget
The new position, used for calculation of the offset. If this argument is omitted, the current
position of the axes at the time of the program execution is used.
ProgPoint
Programmed Point
Data type: robtarget
The original position of the axes at the time of programming.
Continues on next page
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
89
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset is calculated as the difference between \ExeP and ProgPoint for each separate
external axis. If \ExeP has not been specified, the current position of the axes at the time of
the program execution is used instead. Since it is the actual position of the axes that is used,
the axes should not move when EOffsOn is executed.
This offset is then used to displace the position of external axes in subsequent positioning
instructions and remains active until some other offset is activated (the instruction EOffsSet
or EOffsOn ) or until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for each individual external axis can be activated at the same time. Several
EOffsOn , on the other hand, can be programmed one after the other and, if they are, the
different offsets will be added.
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
More examples
More examples of how to use the instruction EOffsOn are illustrated below.
Example 1
SearchL sen1, psearch, p10, v100, tool1;
PDispOn \ExeP:=psearch, *, tool1;
EOffsOn \ExeP:=psearch, *;
A search is carried out in which the searched position of both the robot and the external axes
is stored in the position psearch . Any movement carried out after this starts from this
position using a program displacement of both the robot and the external axes. This is
calculated based on the difference between the searched position and the programmed point
(*) stored in the instruction.
Syntax
EOffsOn
[ '\' ExeP ':=' < expression ( IN ) of robtarget> ',']
[ ProgPoint ':=' ] < expression ( IN ) of robtarget> ';'
Related information
For information about
See
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Coordinate systems
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 91
|
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
3HAC 16581-1 Revision: J
88
© Copyright 2004-2010 ABB. All rights reserved.
1.40. EOffsOn - Activates an offset for external axes
Usage
EOffsOn ( External Offset On ) is used to define and activate an offset for external axes using
two positions.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
Basic examples of the instruction EOffsOn are illustrated below.
See also More examples on page 89 .
Example 1
MoveL p10, v500, z10, tool1;
EOffsOn \ExeP:=p10, p20;
Activation of an offset for external axes. This is calculated for each axis based on the
difference between positions p10 and p20 .
Example 2
MoveL p10, v500, fine \Inpos := inpos50, tool1;
EOffsOn *;
Activation of an offset for external axes. Since a stop point that is accurately defined has been
used in the previous instruction, the argument \ExeP does not have to be used. The
displacement is calculated on the basis of the difference between the actual position of each
axis and the programmed point (*) stored in the instruction.
Arguments
EOffsOn [\ExeP] ProgPoint
[ \ExeP ]
Executed Point
Data type: robtarget
The new position, used for calculation of the offset. If this argument is omitted, the current
position of the axes at the time of the program execution is used.
ProgPoint
Programmed Point
Data type: robtarget
The original position of the axes at the time of programming.
Continues on next page
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
89
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset is calculated as the difference between \ExeP and ProgPoint for each separate
external axis. If \ExeP has not been specified, the current position of the axes at the time of
the program execution is used instead. Since it is the actual position of the axes that is used,
the axes should not move when EOffsOn is executed.
This offset is then used to displace the position of external axes in subsequent positioning
instructions and remains active until some other offset is activated (the instruction EOffsSet
or EOffsOn ) or until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for each individual external axis can be activated at the same time. Several
EOffsOn , on the other hand, can be programmed one after the other and, if they are, the
different offsets will be added.
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
More examples
More examples of how to use the instruction EOffsOn are illustrated below.
Example 1
SearchL sen1, psearch, p10, v100, tool1;
PDispOn \ExeP:=psearch, *, tool1;
EOffsOn \ExeP:=psearch, *;
A search is carried out in which the searched position of both the robot and the external axes
is stored in the position psearch . Any movement carried out after this starts from this
position using a program displacement of both the robot and the external axes. This is
calculated based on the difference between the searched position and the programmed point
(*) stored in the instruction.
Syntax
EOffsOn
[ '\' ExeP ':=' < expression ( IN ) of robtarget> ',']
[ ProgPoint ':=' ] < expression ( IN ) of robtarget> ';'
Related information
For information about
See
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Coordinate systems
Technical reference manual - RAPID overview
Continued
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
3HAC 16581-1 Revision: J
90
© Copyright 2004-2010 ABB. All rights reserved.
1.41. EOffsSet - Activates an offset for external axes using known values
Usage
EOffsSet ( External Offset Set ) is used to define and activate an offset for external axes using
known values.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction EOffsSet is illustrated below.
Example 1
VAR extjoint eax_a_p100 := [100, 0, 0, 0, 0, 0];
...
EOffsSet eax_a_p100;
Activation of an offset eax_a_p100 for external axes, meaning (provided that the logical
external axis "a" is linear) that:
•
The ExtOffs coordinate system is displaced 100 mm for the logical axis "a" (see
figure below).
•
As long as this offset is active, all positions will be displaced 100 mm in the direction
of the x-axis.
The figure shows displacement of an external axis.
xx0500002162
Arguments
EOffsSet EAxOffs
EAxOffs
External Axes Offset
Data type: extjoint
The offset for external axes is defined as data of the type extjoint , expressed in:
•
mm for linear axes
•
degrees for rotating axes
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 92
|
1 Instructions
1.40. EOffsOn - Activates an offset for external axes
RobotWare - OS
89
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset is calculated as the difference between \ExeP and ProgPoint for each separate
external axis. If \ExeP has not been specified, the current position of the axes at the time of
the program execution is used instead. Since it is the actual position of the axes that is used,
the axes should not move when EOffsOn is executed.
This offset is then used to displace the position of external axes in subsequent positioning
instructions and remains active until some other offset is activated (the instruction EOffsSet
or EOffsOn ) or until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for each individual external axis can be activated at the same time. Several
EOffsOn , on the other hand, can be programmed one after the other and, if they are, the
different offsets will be added.
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program execution from the beginning.
More examples
More examples of how to use the instruction EOffsOn are illustrated below.
Example 1
SearchL sen1, psearch, p10, v100, tool1;
PDispOn \ExeP:=psearch, *, tool1;
EOffsOn \ExeP:=psearch, *;
A search is carried out in which the searched position of both the robot and the external axes
is stored in the position psearch . Any movement carried out after this starts from this
position using a program displacement of both the robot and the external axes. This is
calculated based on the difference between the searched position and the programmed point
(*) stored in the instruction.
Syntax
EOffsOn
[ '\' ExeP ':=' < expression ( IN ) of robtarget> ',']
[ ProgPoint ':=' ] < expression ( IN ) of robtarget> ';'
Related information
For information about
See
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Definition of offset using known values
EOffsSet - Activates an offset for external axes
using known values on page 90
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Coordinate systems
Technical reference manual - RAPID overview
Continued
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
3HAC 16581-1 Revision: J
90
© Copyright 2004-2010 ABB. All rights reserved.
1.41. EOffsSet - Activates an offset for external axes using known values
Usage
EOffsSet ( External Offset Set ) is used to define and activate an offset for external axes using
known values.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction EOffsSet is illustrated below.
Example 1
VAR extjoint eax_a_p100 := [100, 0, 0, 0, 0, 0];
...
EOffsSet eax_a_p100;
Activation of an offset eax_a_p100 for external axes, meaning (provided that the logical
external axis "a" is linear) that:
•
The ExtOffs coordinate system is displaced 100 mm for the logical axis "a" (see
figure below).
•
As long as this offset is active, all positions will be displaced 100 mm in the direction
of the x-axis.
The figure shows displacement of an external axis.
xx0500002162
Arguments
EOffsSet EAxOffs
EAxOffs
External Axes Offset
Data type: extjoint
The offset for external axes is defined as data of the type extjoint , expressed in:
•
mm for linear axes
•
degrees for rotating axes
Continues on next page
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
91
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset for external axes is activated when the EOffsSet instruction is executed and
remains active until some other offset is activated (the instruction EOffsSet or EOffsOn ) or
until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for external axes can be activated at the same time. Offsets cannot be added
to one another using EOffsSet .
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program executing from the beginning.
Syntax
EOffsSet
[ EAxOffs ':=' ] < expression ( IN ) of extjoint > ';'
Related information
For information about
See
Activate an offset for external axes
EOffsOn - Activates an offset for external axes
on page 88
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Definition of data of the type extjoint
extjoint - Position of external joints on page 1118
Coordinate systems
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 93
|
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
3HAC 16581-1 Revision: J
90
© Copyright 2004-2010 ABB. All rights reserved.
1.41. EOffsSet - Activates an offset for external axes using known values
Usage
EOffsSet ( External Offset Set ) is used to define and activate an offset for external axes using
known values.
This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in
Motion tasks.
Basic examples
A basic example of the instruction EOffsSet is illustrated below.
Example 1
VAR extjoint eax_a_p100 := [100, 0, 0, 0, 0, 0];
...
EOffsSet eax_a_p100;
Activation of an offset eax_a_p100 for external axes, meaning (provided that the logical
external axis "a" is linear) that:
•
The ExtOffs coordinate system is displaced 100 mm for the logical axis "a" (see
figure below).
•
As long as this offset is active, all positions will be displaced 100 mm in the direction
of the x-axis.
The figure shows displacement of an external axis.
xx0500002162
Arguments
EOffsSet EAxOffs
EAxOffs
External Axes Offset
Data type: extjoint
The offset for external axes is defined as data of the type extjoint , expressed in:
•
mm for linear axes
•
degrees for rotating axes
Continues on next page
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
91
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset for external axes is activated when the EOffsSet instruction is executed and
remains active until some other offset is activated (the instruction EOffsSet or EOffsOn ) or
until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for external axes can be activated at the same time. Offsets cannot be added
to one another using EOffsSet .
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program executing from the beginning.
Syntax
EOffsSet
[ EAxOffs ':=' ] < expression ( IN ) of extjoint > ';'
Related information
For information about
See
Activate an offset for external axes
EOffsOn - Activates an offset for external axes
on page 88
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Definition of data of the type extjoint
extjoint - Position of external joints on page 1118
Coordinate systems
Technical reference manual - RAPID overview
Continued
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
3HAC 16581-1 Revision: J
92
© Copyright 2004-2010 ABB. All rights reserved.
1.42. EraseModule - Erase a module
Usage
EraseModule is used to remove a module from the program memory during execution.
There are no restrictions on how the module was loaded. It could have been loaded manually,
from the configuration, or with a combination of the instructions Load , StartLoad , and
WaitLoad .
The module cannot be defined as Shared in the configuration.
Basic examples
A basic example of the instruction EraseModule is illustrated below.
Example 1
EraseModule "PART_A";
Erase the program module PART_A from the program memory.
Arguments
EraseModule ModuleName
ModuleName
Data type: string
The name of the module that should be removed. Please note that this is the name of the
module, not the name of the file.
Program execution
The program execution waits for the program module to finish the removal process before the
execution proceeds with the next instruction.
When the program module is removed the rest of the program modules will be linked.
Limitations
It is not allowed to remove a program module that is executing.
TRAP routines, system I/O events, and other program tasks cannot execute during the
removal process.
Avoid ongoing robot movements during the removal.
Program stop during execution of EraseModule instruction results in guard stop with motors
off and error message "20025 Stop order timeout" on the FlexPendant.
Error handling
If the file in the EraseModule instruction cannot be removed because it was not found, the
system variable ERRNO is set to ERR_MODULE. This error can then be handled in the error
handler.
Syntax
EraseModule
[ModuleName':=']<expression (IN) of string>';'
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 94
|
1 Instructions
1.41. EOffsSet - Activates an offset for external axes using known values
RobotWare - OS
91
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
The offset for external axes is activated when the EOffsSet instruction is executed and
remains active until some other offset is activated (the instruction EOffsSet or EOffsOn ) or
until the offset for external axes is deactivated (the instruction EOffsOff ).
Only one offset for external axes can be activated at the same time. Offsets cannot be added
to one another using EOffsSet .
The external axes offset is automatically reset:
•
At a cold start-up.
•
When a new program is loaded.
•
When starting program executing from the beginning.
Syntax
EOffsSet
[ EAxOffs ':=' ] < expression ( IN ) of extjoint > ';'
Related information
For information about
See
Activate an offset for external axes
EOffsOn - Activates an offset for external axes
on page 88
Deactivation of offset for external axes
EOffsOff - Deactivates an offset for external
axes on page 87
Displacement of the robot’s movements
PDispOn - Activates program displacement on
page 317
Definition of data of the type extjoint
extjoint - Position of external joints on page 1118
Coordinate systems
Technical reference manual - RAPID overview
Continued
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
3HAC 16581-1 Revision: J
92
© Copyright 2004-2010 ABB. All rights reserved.
1.42. EraseModule - Erase a module
Usage
EraseModule is used to remove a module from the program memory during execution.
There are no restrictions on how the module was loaded. It could have been loaded manually,
from the configuration, or with a combination of the instructions Load , StartLoad , and
WaitLoad .
The module cannot be defined as Shared in the configuration.
Basic examples
A basic example of the instruction EraseModule is illustrated below.
Example 1
EraseModule "PART_A";
Erase the program module PART_A from the program memory.
Arguments
EraseModule ModuleName
ModuleName
Data type: string
The name of the module that should be removed. Please note that this is the name of the
module, not the name of the file.
Program execution
The program execution waits for the program module to finish the removal process before the
execution proceeds with the next instruction.
When the program module is removed the rest of the program modules will be linked.
Limitations
It is not allowed to remove a program module that is executing.
TRAP routines, system I/O events, and other program tasks cannot execute during the
removal process.
Avoid ongoing robot movements during the removal.
Program stop during execution of EraseModule instruction results in guard stop with motors
off and error message "20025 Stop order timeout" on the FlexPendant.
Error handling
If the file in the EraseModule instruction cannot be removed because it was not found, the
system variable ERRNO is set to ERR_MODULE. This error can then be handled in the error
handler.
Syntax
EraseModule
[ModuleName':=']<expression (IN) of string>';'
Continues on next page
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
93
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Load a program module in parallel with
another program execution
StartLoad - Load a program module during
execution on page 482
WaitLoad - Connect the loaded module to the task
on page 682
Accept unresolved reference
Technical reference manual - System parameters ,
section Controller
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 95
|
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
3HAC 16581-1 Revision: J
92
© Copyright 2004-2010 ABB. All rights reserved.
1.42. EraseModule - Erase a module
Usage
EraseModule is used to remove a module from the program memory during execution.
There are no restrictions on how the module was loaded. It could have been loaded manually,
from the configuration, or with a combination of the instructions Load , StartLoad , and
WaitLoad .
The module cannot be defined as Shared in the configuration.
Basic examples
A basic example of the instruction EraseModule is illustrated below.
Example 1
EraseModule "PART_A";
Erase the program module PART_A from the program memory.
Arguments
EraseModule ModuleName
ModuleName
Data type: string
The name of the module that should be removed. Please note that this is the name of the
module, not the name of the file.
Program execution
The program execution waits for the program module to finish the removal process before the
execution proceeds with the next instruction.
When the program module is removed the rest of the program modules will be linked.
Limitations
It is not allowed to remove a program module that is executing.
TRAP routines, system I/O events, and other program tasks cannot execute during the
removal process.
Avoid ongoing robot movements during the removal.
Program stop during execution of EraseModule instruction results in guard stop with motors
off and error message "20025 Stop order timeout" on the FlexPendant.
Error handling
If the file in the EraseModule instruction cannot be removed because it was not found, the
system variable ERRNO is set to ERR_MODULE. This error can then be handled in the error
handler.
Syntax
EraseModule
[ModuleName':=']<expression (IN) of string>';'
Continues on next page
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
93
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Load a program module in parallel with
another program execution
StartLoad - Load a program module during
execution on page 482
WaitLoad - Connect the loaded module to the task
on page 682
Accept unresolved reference
Technical reference manual - System parameters ,
section Controller
Continued
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
94
© Copyright 2004-2010 ABB. All rights reserved.
1.43. ErrLog - Write an error message
Usage
ErrLog is used to display an error message on the FlexPendant and write it in the event log.
Error number and five error arguments must be stated. The message is stored in the process
domain in the robot log. ErrLog can also be used to display warnings and information
messages.
Basic examples
Basic examples of the instruction ErrLog are illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
VAR errstr my_title := "myerror";
VAR errstr str1 := "errortext1";
VAR errstr str2 := "errortext2";
VAR errstr str3 := "errortext3";
VAR errstr str4 := "errortext4";
ErrLog 4800, my_title, str1,str2,str3,str4;
On the FlexPendant the message will look like this:
Event Message: 4800
myerror
errortext1
errortext2
errortext3
errortext4
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message is sent in by the
ErrLog instruction. The ErrorId in the .xml file is the same stated in the ErrLog
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="5210" eDefine="ERR_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p />
</Description>
</Message>
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 96
|
1 Instructions
1.42. EraseModule - Erase a module
RobotWare - OS
93
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Related information
For information about
See
Unload a program module
UnLoad - UnLoad a program module during
execution on page 655
Load a program module in parallel with
another program execution
StartLoad - Load a program module during
execution on page 482
WaitLoad - Connect the loaded module to the task
on page 682
Accept unresolved reference
Technical reference manual - System parameters ,
section Controller
Continued
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
94
© Copyright 2004-2010 ABB. All rights reserved.
1.43. ErrLog - Write an error message
Usage
ErrLog is used to display an error message on the FlexPendant and write it in the event log.
Error number and five error arguments must be stated. The message is stored in the process
domain in the robot log. ErrLog can also be used to display warnings and information
messages.
Basic examples
Basic examples of the instruction ErrLog are illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
VAR errstr my_title := "myerror";
VAR errstr str1 := "errortext1";
VAR errstr str2 := "errortext2";
VAR errstr str3 := "errortext3";
VAR errstr str4 := "errortext4";
ErrLog 4800, my_title, str1,str2,str3,str4;
On the FlexPendant the message will look like this:
Event Message: 4800
myerror
errortext1
errortext2
errortext3
errortext4
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message is sent in by the
ErrLog instruction. The ErrorId in the .xml file is the same stated in the ErrLog
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="5210" eDefine="ERR_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p />
</Description>
</Message>
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
95
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example of instruction:
MODULE MyModule
PROC main()
VAR num errorid := 5210;
VAR errstr arg := "P1";
ErrLog errorid, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ErrLog errorid \W, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this:
Event Message: 5210
Parameter error
Task: T_ROB1
Symbol P1 is read-only.
Context: MyModule/main/ErrLog
The first ErrLog instruction generates an error message. The message is stored in the robot
log in the process domain. It is also shown on the FlexPendant display.
The second instruction is a warning. A message is stored in the robot log only.
The program will in both cases continue its execution when the instruction is done.
Arguments
ErrLog ErrorID [\W] | [\I] Argument1 Argument2 Argument3 Argument4
Argument5
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot event log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 97
|
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
94
© Copyright 2004-2010 ABB. All rights reserved.
1.43. ErrLog - Write an error message
Usage
ErrLog is used to display an error message on the FlexPendant and write it in the event log.
Error number and five error arguments must be stated. The message is stored in the process
domain in the robot log. ErrLog can also be used to display warnings and information
messages.
Basic examples
Basic examples of the instruction ErrLog are illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
VAR errstr my_title := "myerror";
VAR errstr str1 := "errortext1";
VAR errstr str2 := "errortext2";
VAR errstr str3 := "errortext3";
VAR errstr str4 := "errortext4";
ErrLog 4800, my_title, str1,str2,str3,str4;
On the FlexPendant the message will look like this:
Event Message: 4800
myerror
errortext1
errortext2
errortext3
errortext4
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message is sent in by the
ErrLog instruction. The ErrorId in the .xml file is the same stated in the ErrLog
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="5210" eDefine="ERR_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p />
</Description>
</Message>
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
95
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example of instruction:
MODULE MyModule
PROC main()
VAR num errorid := 5210;
VAR errstr arg := "P1";
ErrLog errorid, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ErrLog errorid \W, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this:
Event Message: 5210
Parameter error
Task: T_ROB1
Symbol P1 is read-only.
Context: MyModule/main/ErrLog
The first ErrLog instruction generates an error message. The message is stored in the robot
log in the process domain. It is also shown on the FlexPendant display.
The second instruction is a warning. A message is stored in the robot log only.
The program will in both cases continue its execution when the instruction is done.
Arguments
ErrLog ErrorID [\W] | [\I] Argument1 Argument2 Argument3 Argument4
Argument5
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot event log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Continued
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
96
© Copyright 2004-2010 ABB. All rights reserved.
Argument 1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Program execution
An error message (max 5 lines) is displayed on the FlexPendant and written in the event log.
In the case of argument \W or argument \I a warning or an information message is written
in the event log.
ErrLog generates program errors between 4800-4814 if using the xml file that are installed
by the system, and between 5000-9999 if installing an own xml file. The error generated
depends on the ErrorID indicated.
The message is stored in the process domain in the event log.
How to install an own xml file is described in the Additional options manual, see Related
information below.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 98
|
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
95
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example of instruction:
MODULE MyModule
PROC main()
VAR num errorid := 5210;
VAR errstr arg := "P1";
ErrLog errorid, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ErrLog errorid \W, ERRSTR_TASK, arg,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this:
Event Message: 5210
Parameter error
Task: T_ROB1
Symbol P1 is read-only.
Context: MyModule/main/ErrLog
The first ErrLog instruction generates an error message. The message is stored in the robot
log in the process domain. It is also shown on the FlexPendant display.
The second instruction is a warning. A message is stored in the robot log only.
The program will in both cases continue its execution when the instruction is done.
Arguments
ErrLog ErrorID [\W] | [\I] Argument1 Argument2 Argument3 Argument4
Argument5
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot event log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Continued
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
96
© Copyright 2004-2010 ABB. All rights reserved.
Argument 1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Program execution
An error message (max 5 lines) is displayed on the FlexPendant and written in the event log.
In the case of argument \W or argument \I a warning or an information message is written
in the event log.
ErrLog generates program errors between 4800-4814 if using the xml file that are installed
by the system, and between 5000-9999 if installing an own xml file. The error generated
depends on the ErrorID indicated.
The message is stored in the process domain in the event log.
How to install an own xml file is described in the Additional options manual, see Related
information below.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
Continued
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
97
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrLog
[ErrorId ':=' ] < expression ( IN ) of num> ','
[ '\'W ] | [' \' I ] ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Display message on the FlexPendant
TPWrite - Writes on the FlexPendant on page
568
UIMsgBox - User Message Dialog Box type basic
on page 644
Event log
Operating manual - IRC5 with FlexPendant
Event log messages, explanation of xml-
file
Application manual - Additional options , section
Event log messages
How to install XML files when using
additional options
Application manual - Additional options
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 99
|
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
96
© Copyright 2004-2010 ABB. All rights reserved.
Argument 1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Program execution
An error message (max 5 lines) is displayed on the FlexPendant and written in the event log.
In the case of argument \W or argument \I a warning or an information message is written
in the event log.
ErrLog generates program errors between 4800-4814 if using the xml file that are installed
by the system, and between 5000-9999 if installing an own xml file. The error generated
depends on the ErrorID indicated.
The message is stored in the process domain in the event log.
How to install an own xml file is described in the Additional options manual, see Related
information below.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
Continued
Continues on next page
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
97
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrLog
[ErrorId ':=' ] < expression ( IN ) of num> ','
[ '\'W ] | [' \' I ] ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Display message on the FlexPendant
TPWrite - Writes on the FlexPendant on page
568
UIMsgBox - User Message Dialog Box type basic
on page 644
Event log
Operating manual - IRC5 with FlexPendant
Event log messages, explanation of xml-
file
Application manual - Additional options , section
Event log messages
How to install XML files when using
additional options
Application manual - Additional options
Continued
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
98
© Copyright 2004-2010 ABB. All rights reserved.
1.44. ErrRaise - Writes a warning and calls an error handler
Usage
ErrRaise is used to create an error in the program and then call the error handler of the
routine. A warning is written in the event log. ErrRaise can also be used in the error handler
to propagate the current error to the error handler of the calling routine.
Error name, error number, and five error arguments must be stated. The message is stored in
the process domain in the robot log.
Basic examples
Basic examples of the instruction ErrRaise is illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 4800;
VAR errstr my_title := "Backup battery status";
VAR errstr str1 := "Bacup battery is fully charged";
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, my_title, ERRSTR_TASK, str1,
ERRSTR_CONTEXT,ERRSTR_EMPTY;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 4800
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 100
|
1 Instructions
1.43. ErrLog - Write an error message
RobotWare - OS
97
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrLog
[ErrorId ':=' ] < expression ( IN ) of num> ','
[ '\'W ] | [' \' I ] ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Display message on the FlexPendant
TPWrite - Writes on the FlexPendant on page
568
UIMsgBox - User Message Dialog Box type basic
on page 644
Event log
Operating manual - IRC5 with FlexPendant
Event log messages, explanation of xml-
file
Application manual - Additional options , section
Event log messages
How to install XML files when using
additional options
Application manual - Additional options
Continued
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
98
© Copyright 2004-2010 ABB. All rights reserved.
1.44. ErrRaise - Writes a warning and calls an error handler
Usage
ErrRaise is used to create an error in the program and then call the error handler of the
routine. A warning is written in the event log. ErrRaise can also be used in the error handler
to propagate the current error to the error handler of the calling routine.
Error name, error number, and five error arguments must be stated. The message is stored in
the process domain in the robot log.
Basic examples
Basic examples of the instruction ErrRaise is illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 4800;
VAR errstr my_title := "Backup battery status";
VAR errstr str1 := "Bacup battery is fully charged";
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, my_title, ERRSTR_TASK, str1,
ERRSTR_CONTEXT,ERRSTR_EMPTY;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 4800
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
99
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message are sent in by the
ErrRaise instruction. The ErrorId in the .xml file is the same stated in the ErrRaise
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="7055" eDefine="SYS_ERR_ARL_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p /></
Description>
</Message>
Example of instruction:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 7055;
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, ERRSTR_TASK,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED,
ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 7055
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 101
|
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
98
© Copyright 2004-2010 ABB. All rights reserved.
1.44. ErrRaise - Writes a warning and calls an error handler
Usage
ErrRaise is used to create an error in the program and then call the error handler of the
routine. A warning is written in the event log. ErrRaise can also be used in the error handler
to propagate the current error to the error handler of the calling routine.
Error name, error number, and five error arguments must be stated. The message is stored in
the process domain in the robot log.
Basic examples
Basic examples of the instruction ErrRaise is illustrated below.
Example 1
In case you do not want to make your own .xml file, you can use ErrorId 4800 like in the
example below:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 4800;
VAR errstr my_title := "Backup battery status";
VAR errstr str1 := "Bacup battery is fully charged";
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, my_title, ERRSTR_TASK, str1,
ERRSTR_CONTEXT,ERRSTR_EMPTY;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 4800
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
99
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message are sent in by the
ErrRaise instruction. The ErrorId in the .xml file is the same stated in the ErrRaise
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="7055" eDefine="SYS_ERR_ARL_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p /></
Description>
</Message>
Example of instruction:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 7055;
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, ERRSTR_TASK,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED,
ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 7055
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
100
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
ErrRaise ErrorName ErrorId Argument1 Argument2 Argument3 Argument4
Argument5
ErrorName
Data type: string
An error number must be booked using the instruction BookErrNo . Corresponding variable
is stated as ErrorName .
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
Argument1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 102
|
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
99
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Example 2
An ErrorId must be declared in an .xml file. The number must be between 5000 - 9999. The
error message is written in the .xml file and the arguments to the message are sent in by the
ErrRaise instruction. The ErrorId in the .xml file is the same stated in the ErrRaise
instruction.
NOTE: If using an ErrorId between 5000-9999 you have to install your own xml file.
Example of message in .xml file:
<Message number="7055" eDefine="SYS_ERR_ARL_INPAR_RDONLY">
<Title>Parameter error</Title>
<Description>Task:<arg format="%s" ordinal="1" />
<p />Symbol <arg format="%s" ordinal="2" />is read-only
<p />Context:<arg format="%s" ordinal="3" /><p /></
Description>
</Message>
Example of instruction:
MODULE MyModule
VAR errnum ERR_BATT:=-1;
PROC main()
VAR num errorid := 7055;
BookErrNo ERR_BATT;
ErrRaise "ERR_BATT", errorid, ERRSTR_TASK,
ERRSTR_CONTEXT,ERRSTR_UNUSED, ERRSTR_UNUSED,
ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
TRYNEXT;
ENDIF
ENDPROC
ENDMODULE
On the FlexPendant the message will look like this (warning and/or an error):
Event Message: 7055
Backup battery status
Task: main
Backup battery is fully charged
Context: MyModule/main/ErrRaise
An error number must be booked with the instruction BookErrNo . Corresponding string is
stated as the first argument, ErrorName , in the ErrRaise .
ErrRaise creates an error and then calls the error handler. If the error is taken care of, a
warning is generated in the event log, in the process domain. Otherwise a fatal error is
generated and the program stops.
ErrRaise can also be used in an error handler in a subroutine. In this case the execution
continues in the error handler of the calling routine.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
100
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
ErrRaise ErrorName ErrorId Argument1 Argument2 Argument3 Argument4
Argument5
ErrorName
Data type: string
An error number must be booked using the instruction BookErrNo . Corresponding variable
is stated as ErrorName .
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
Argument1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
101
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
ErrRaise generates program warningss between 4800-4814 if using the xml file that are
installed by the system, and between 5000-9999 if installing an own xml file. The error
generated depends on the ErrorID indicated. A warning is written in the robot message log
in the domain process.
When the ErrRaise is executed the behavior depends on where it is executed:
•
When executing instruction in the routine body, a warning is generated, and the
execution continues in the error handler.
•
When executing instruction in an error handler, the old warning is skipped, a new one
is generated, and the control is raised to calling instruction.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
More examples
More examples of how to use the instruction ErrRaise are illustrated below.
Example 1
VAR errnum ERR_BATT:=-1;
VAR errnum ERR_NEW_ERR:=-1;
PROC main()
testerrraise;
ENDPROC
PROC testerrraise()
BookErrNo ERR_BATT;
BookErrNo ERR_NEW_ERR;
ErrRaise "ERR_BATT",7055,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
ErrRaise "ERR_NEW_ERR",7156,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDIF
ENDPROC
Generate new warning 7156 from error handler. Raise control to calling routine and stop
execution.
Continued
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 103
|
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
100
© Copyright 2004-2010 ABB. All rights reserved.
Arguments
ErrRaise ErrorName ErrorId Argument1 Argument2 Argument3 Argument4
Argument5
ErrorName
Data type: string
An error number must be booked using the instruction BookErrNo . Corresponding variable
is stated as ErrorName .
ErrorId
Data type: num
The number of a specific error that is to be monitored. The error number must be in interval
4800-4814 if using the preinstalled xml file, and between 5000 - 9999 if using an own xml
file.
Argument1
Data type: errstr
First argument in the error message. Any string or predefined data of type errstr can be
used.
Argument2
Data type: errstr
Second argument in the error message. Any string or predefined data of type errstr can be
used.
Argument3
Data type: errstr
Third argument in the error message. Any string or predefined data of type errstr can be
used
Argument4
Data type: errstr
Fourth argument in the error message. Any string or predefined data of type errstr can be
used.
Argument5
Data type: errstr
Fifth argument in the error message. Any string or predefined data of type errstr can be
used.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
101
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
ErrRaise generates program warningss between 4800-4814 if using the xml file that are
installed by the system, and between 5000-9999 if installing an own xml file. The error
generated depends on the ErrorID indicated. A warning is written in the robot message log
in the domain process.
When the ErrRaise is executed the behavior depends on where it is executed:
•
When executing instruction in the routine body, a warning is generated, and the
execution continues in the error handler.
•
When executing instruction in an error handler, the old warning is skipped, a new one
is generated, and the control is raised to calling instruction.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
More examples
More examples of how to use the instruction ErrRaise are illustrated below.
Example 1
VAR errnum ERR_BATT:=-1;
VAR errnum ERR_NEW_ERR:=-1;
PROC main()
testerrraise;
ENDPROC
PROC testerrraise()
BookErrNo ERR_BATT;
BookErrNo ERR_NEW_ERR;
ErrRaise "ERR_BATT",7055,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
ErrRaise "ERR_NEW_ERR",7156,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDIF
ENDPROC
Generate new warning 7156 from error handler. Raise control to calling routine and stop
execution.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
102
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrRaise
[ErrorName ':=' ] < expression ( IN ) of string> ','
[ErrorId ':=' ] < expression ( IN ) of num> ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Booking error numbers
BookErrNo - Book a RAPID system error number
on page 30
Error handling
Technical reference manual - RAPID overview
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 104
|
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
101
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
Program execution
ErrRaise generates program warningss between 4800-4814 if using the xml file that are
installed by the system, and between 5000-9999 if installing an own xml file. The error
generated depends on the ErrorID indicated. A warning is written in the robot message log
in the domain process.
When the ErrRaise is executed the behavior depends on where it is executed:
•
When executing instruction in the routine body, a warning is generated, and the
execution continues in the error handler.
•
When executing instruction in an error handler, the old warning is skipped, a new one
is generated, and the control is raised to calling instruction.
Limitations
Total string length (Argument1-Argument5) is limited to 195 characters.
More examples
More examples of how to use the instruction ErrRaise are illustrated below.
Example 1
VAR errnum ERR_BATT:=-1;
VAR errnum ERR_NEW_ERR:=-1;
PROC main()
testerrraise;
ENDPROC
PROC testerrraise()
BookErrNo ERR_BATT;
BookErrNo ERR_NEW_ERR;
ErrRaise "ERR_BATT",7055,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED;
ERROR
IF ERRNO = ERR_BATT THEN
ErrRaise "ERR_NEW_ERR",7156,ERRSTR_TASK,ERRSTR_CONTEXT,
ERRSTR_UNUSED,ERRSTR_UNUSED, ERRSTR_UNUSED;
ENDIF
ENDPROC
Generate new warning 7156 from error handler. Raise control to calling routine and stop
execution.
Continued
Continues on next page
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
102
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrRaise
[ErrorName ':=' ] < expression ( IN ) of string> ','
[ErrorId ':=' ] < expression ( IN ) of num> ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Booking error numbers
BookErrNo - Book a RAPID system error number
on page 30
Error handling
Technical reference manual - RAPID overview
Continued
1 Instructions
1.45. ErrWrite - Write an error message
RobotWare - OS
103
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.45. ErrWrite - Write an error message
Usage
ErrWrite ( Error Write ) is used to display an error message on the FlexPendant and write it
in the event log. It can also be used to display warnings and information messages.
Basic examples
Basic examples of the instruction ErrWrite are illustrated below.
Example 1
ErrWrite "PLC error", "Fatal error in PLC" \RL2:="Call service";
Stop;
A message is stored in the robot log. The message is also shown on the FlexPendant display.
Example 2
ErrWrite \W, "Search error", "No hit for the first search";
RAISE try_search_again;
A message is stored in the robot log only. Program execution then continues.
Arguments
ErrWrite [ \W ] | [\I] Header Reason [ \RL2] [ \RL3] [ \RL4]
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot error message log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Header
Data type: string
Error message heading (max. 46 characters).
Reason
Data type: string
Reason for error.
[ \RL2]
Reason Line 2
Data type: string
Reason for error.
Continues on next page
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 105
|
1 Instructions
1.44. ErrRaise - Writes a warning and calls an error handler
RobotWare - OS
3HAC 16581-1 Revision: J
102
© Copyright 2004-2010 ABB. All rights reserved.
Syntax
ErrRaise
[ErrorName ':=' ] < expression ( IN ) of string> ','
[ErrorId ':=' ] < expression ( IN ) of num> ','
[Argument1 ':=' ] < expression ( IN ) of errstr> ','
[Argument2 ':=' ] < expression ( IN ) of errstr> ','
[Argument3 ':=' ] < expression ( IN ) of errstr> ','
[Argument4 ':=' ] < expression ( IN ) of errstr> ','
[Argument5 ':=' ] < expression ( IN ) of errstr> ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Booking error numbers
BookErrNo - Book a RAPID system error number
on page 30
Error handling
Technical reference manual - RAPID overview
Continued
1 Instructions
1.45. ErrWrite - Write an error message
RobotWare - OS
103
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.45. ErrWrite - Write an error message
Usage
ErrWrite ( Error Write ) is used to display an error message on the FlexPendant and write it
in the event log. It can also be used to display warnings and information messages.
Basic examples
Basic examples of the instruction ErrWrite are illustrated below.
Example 1
ErrWrite "PLC error", "Fatal error in PLC" \RL2:="Call service";
Stop;
A message is stored in the robot log. The message is also shown on the FlexPendant display.
Example 2
ErrWrite \W, "Search error", "No hit for the first search";
RAISE try_search_again;
A message is stored in the robot log only. Program execution then continues.
Arguments
ErrWrite [ \W ] | [\I] Header Reason [ \RL2] [ \RL3] [ \RL4]
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot error message log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Header
Data type: string
Error message heading (max. 46 characters).
Reason
Data type: string
Reason for error.
[ \RL2]
Reason Line 2
Data type: string
Reason for error.
Continues on next page
1 Instructions
1.45. ErrWrite - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
104
© Copyright 2004-2010 ABB. All rights reserved.
[ \RL3]
Reason Line 3
Data type: string
Reason for error.
[ \RL4]
Reason Line 4
Data type: string
Reason for error.
Program execution
An error message (max. 5 lines) is displayed on the FlexPendant and written in the robot
message log.
In the case of argument \W or argument \I a warning or an information message is written
in the event log.
ErrWrite generates the program error no. 80001 for an error, no. 80002 for a warning ( \W )
and no. 80003 for an information message (\I).
Limitations
Total string length (Header+Reason+\RL2+\RL3+\RL4) is limited to 195 characters.
Syntax
ErrWrite
[ '\'W ] | [ '\' I ] ','
[ Header ':=' ] < expression ( IN ) of string>','
[ Reason ':=' ] < expression ( IN ) of string>
[ ’\’RL2 ':=' < expression ( IN ) of string> ]
[ ’\’RL3 ':=' < expression ( IN ) of string> ]
[ ’\’RL4 ':=' < expression ( IN ) of string> ] ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Display message on the FlexPendant
TPWrite - Writes on the FlexPendant on page
568
UIMsgBox - User Message Dialog Box type basic
on page 644
Event log
Operating manual - IRC5 with FlexPendant
Write error message - Err Log
ErrLog - Write an error message on page 94
Continued
|
ABB_Technical_Reference_Manual
|
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
| 106
|
1 Instructions
1.45. ErrWrite - Write an error message
RobotWare - OS
103
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.45. ErrWrite - Write an error message
Usage
ErrWrite ( Error Write ) is used to display an error message on the FlexPendant and write it
in the event log. It can also be used to display warnings and information messages.
Basic examples
Basic examples of the instruction ErrWrite are illustrated below.
Example 1
ErrWrite "PLC error", "Fatal error in PLC" \RL2:="Call service";
Stop;
A message is stored in the robot log. The message is also shown on the FlexPendant display.
Example 2
ErrWrite \W, "Search error", "No hit for the first search";
RAISE try_search_again;
A message is stored in the robot log only. Program execution then continues.
Arguments
ErrWrite [ \W ] | [\I] Header Reason [ \RL2] [ \RL3] [ \RL4]
[ \W ]
Warning
Data type: switch
Gives a warning that is stored in the robot error message log only (not shown directly on the
FlexPendant display).
[ \I ]
Information
Data type: switch
Gives an information message that is stored in the event log only (not shown directly on the
FlexPendant display).
If none of the arguments \W or \I are specified then the instruction will generate an error
message directly on the flexpendant and also store it in the event log.
Header
Data type: string
Error message heading (max. 46 characters).
Reason
Data type: string
Reason for error.
[ \RL2]
Reason Line 2
Data type: string
Reason for error.
Continues on next page
1 Instructions
1.45. ErrWrite - Write an error message
RobotWare - OS
3HAC 16581-1 Revision: J
104
© Copyright 2004-2010 ABB. All rights reserved.
[ \RL3]
Reason Line 3
Data type: string
Reason for error.
[ \RL4]
Reason Line 4
Data type: string
Reason for error.
Program execution
An error message (max. 5 lines) is displayed on the FlexPendant and written in the robot
message log.
In the case of argument \W or argument \I a warning or an information message is written
in the event log.
ErrWrite generates the program error no. 80001 for an error, no. 80002 for a warning ( \W )
and no. 80003 for an information message (\I).
Limitations
Total string length (Header+Reason+\RL2+\RL3+\RL4) is limited to 195 characters.
Syntax
ErrWrite
[ '\'W ] | [ '\' I ] ','
[ Header ':=' ] < expression ( IN ) of string>','
[ Reason ':=' ] < expression ( IN ) of string>
[ ’\’RL2 ':=' < expression ( IN ) of string> ]
[ ’\’RL3 ':=' < expression ( IN ) of string> ]
[ ’\’RL4 ':=' < expression ( IN ) of string> ] ';'
Related information
For information about
See
Predefined data of type errstr
errstr - Error string on page 1114
Display message on the FlexPendant
TPWrite - Writes on the FlexPendant on page
568
UIMsgBox - User Message Dialog Box type basic
on page 644
Event log
Operating manual - IRC5 with FlexPendant
Write error message - Err Log
ErrLog - Write an error message on page 94
Continued
1 Instructions
1.46. EXIT - Terminates program execution
RobotWare - OS
105
3HAC 16581-1 Revision: J
© Copyright 2004-2010 ABB. All rights reserved.
1.46. EXIT - Terminates program execution
Usage
EXIT is used to terminate program execution. Program restart will then be blocked, that is
the program can only be restarted from the first instruction of the main routine.
The EXIT instruction should be used when fatal errors occur or when program execution is
to be stopped permanently. The Stop instruction is used to temporarily stop program
execution. After execution of the instruction EXIT the program pointer is gone. To continue
program execution, the program pointer must be set.
Basic examples
A basic example of the instruction EXIT is illustrated below.
Example 1
ErrWrite "Fatal error","Illegal state";
EXIT;
Program execution stops and cannot be restarted from that position in the program.
Syntax
EXIT ';'
Related information
For information about
See
Stopping program execution temporarily
Stop - Stops program execution on page 510
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.