ABB RAPID Instructions, Functions and Data Types

  • Upload
    shuny51

  • View
    297

  • Download
    1

Embed Size (px)

Citation preview

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    1/1332

    ABB Robotics

    Technical reference manualRAPID Instructions, Functions and Data types

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    2/1332

    Trace back information:

    Workspace R13-1 version a9

    Checked in 2013-04-03Skribenta version 4.0.006

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    3/1332

    Technical reference manual

    RAPID Instructions, Functions and Data types

    RobotWare 5.15.01

    Document ID: 3HAC16581-1

    Revision: P

    Copyright 2004-2013 ABB. All rights reserved.

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    4/1332

    The information in this manual is subject to change without notice and should notbe construedas a commitment by ABB. ABB assumes no responsibility foranyerrorsthat may appear in this manual.Except as may be expressly stated anywhere in this manual, nothing herein shall beconstrued as any kind of guarantee or warranty by ABB for losses, damages topersons or property, fitness for a specific purpose or the like.In no event shall ABB be liable for incidental or consequential damages arising fromuse of this manual and products described herein.This manual and parts thereof must not be reproduced or copied without ABB'swritten permission.Additional copies of this manual may be obtained from ABB.The original language for this publication is English. Any other languages that aresupplied have been translated from English.

    Copyright 2004-2013 ABB. All rights reserved.

    ABB ABRobotics Products

    SE-721 68 VstersSweden

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    5/1332

    Table of contents

    15Overview of this manual ...................................................................................................................

    191 Instructions

    191.1 AccSet - Reduces the acceleration .............. ........ ........ ........ ....... ........ ........ ........ ..211.2 ActEventBuffer - Activation of event buffer .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ...231.3 ActUnit - Activates a mechanical unit ....... ........ ........ ........ ....... ........ ........ ........ ......251.4 Add - Adds a numeric value ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ..271.5 AliasIO - Define I/O signal with alias name .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...301.6 ":=" - Assigns a value ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ...321.7 BitClear - Clear a specified bit in a byte or dnum data .... .... .... ... .... .... .... .... .... .... .... ...351.8 BitSet - Set a specified bit in a byte or dnum data .... .... .... ... .... .... .... .... .... .... .... ... .... ..381.9 BookErrNo - Book a RAPID system error number .... .... ... .... .... .... .... .... .... .... ... .... .... ..401.10 Break - Break program execution ............ ........ ........ ....... ........ ........ ........ ....... .......411.11 CallByVar - Call a procedure by a variable .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... ...431.12 CancelLoad - Cancel loading of a module ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .451.13 CheckProgRef - Check program references .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .461.14 CirPathMode - Tool reorientation during circle path ... .... .... ... .... .... .... .... .... .... .... ... ....521.15 Clear - Clears the value ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ........531.16 ClearIOBuff - Clear input buffer of a serial channel ...... .... .... .... .... .... .... ... .... .... .... .... .551.17 ClearPath - Clear current path ......... ........ ....... ........ ........ ........ ....... ........ ........ ......591.18 ClearRawBytes - Clear the contents of rawbytes data ...... .... .... .... .... ... .... .... .... .... .... .611.19 ClkReset - Resets a clock used for timing ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .621.20 ClkStart - Starts a clock used for timing .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ...641.21 ClkStop - Stops a clock used for timing .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...651.22 Close - Closes a file or serial channel .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ..661.23 CloseDir - Close a directory ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ....671.24 Comment - Comment ........ ....... ........ ........ ........ ....... ........ ........ ....... ........ ........ ....681.25 Compact IF - If a condition is met, then... (one instruction) .. .. ... ... .. ... .. ... ... .. ... .. ... .. ... ..

    691.26 ConfJ - Controls the configuration during joint movement ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... .. 711.27 ConfL - Monitors the configuration during linear movement .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. .731.28 CONNECT - Connects an interrupt to a trap routine .... .... .... .... .... ... .... .... .... .... .... .... .751.29 CopyFile - Copy a file ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ....771.30 CopyRawBytes - Copy the contents of rawbytes data ...... .... .... .... .... ... .... .... .... .... .... ..791.31 CorrClear - Removes all correction generators .... .... .... .... .... .... .... ... .... .... .... .... .... ....801.32 CorrCon - Connects to a correction generator .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...851.33 CorrDiscon - Disconnects from a correction generator .... .... .... ... .... .... .... .... .... .... .... ..861.34 CorrWrite - Writes to a correction generator .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .881.35 DeactEventBuffer - Deactivation of event buffer ..... ... .... .... .... .... .... ... .... .... .... .... .... ...901.36 DeactUnit - Deactivates a mechanical unit .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ...921.37 Decr - Decrements by 1 ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .941.38 DitherAct - Enables dither for soft servo .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .... ..961.39 DitherDeact - Disables dither for soft servo ...... ... .... .... .... .... .... ... .... .... .... .... .... .... ....971.40 DropWObj - Drop work object on conveyor .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...981.41 EOffsOff - Deactivates an offset for additional axes ...... .... .... .... .... ... .... .... .... .... .... ....991.42 EOffsOn - Activates an offset for additional axes ... .... .... .... .... .... .... ... .... .... .... .... .... ..

    1011.43 EOffsSet - Activates an offset for additional axes using known values .... ... ... .. ... .. ... ... ..1031.44 EraseModule - Erase a module ........... ....... ........ ........ ........ ....... ........ ........ ........ ...1051.45 ErrLog - Write an error message .......... ....... ........ ........ ........ ....... ........ ........ ........ ..1091.46 ErrRaise - Writes a warning and calls an error handler ... .... .... .... ... .... .... .... .... .... .... ...1131.47 ErrWrite - Write an error message ....... ........ ........ ........ ....... ........ ........ ........ ....... ...1151.48 EXIT - Terminates program execution .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....1161.49 ExitCycle - Break current cycle and start next ... .... .... .... .... .... .... .... ... .... .... .... .... .... ...1181.50 FOR - Repeats a given number of times .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ..1201.51 GetDataVal - Get the value of a data object .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ..1231.52 GetSysData - Get system data .......... ........ ....... ........ ........ ........ ....... ........ ........ .....

    1261.53 GetTrapData - Get interrupt data for current TRAP ..... .... .... .... ... .... .... .... .... .... .... .... ..

    3HAC16581-1 Revision: P 5 Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    6/1332

    1281.54 GOTO - Goes to a new instruction .............. ........ ........ ....... ........ ........ ........ ....... ....1301.55 GripLoad - Defines the payload for a robot ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ....1321.56 HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 ... .. ... ... .. ... .. ... ... .. ... ..1341.57 IDelete - Cancels an interrupt ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .

    1351.58 IDisable - Disables interrupts ............. ........ ....... ........ ........ ........ ....... ........ ........ .... 1361.59 IEnable - Enables interrupts ......... ........ ....... ........ ........ ........ ....... ........ ........ ........ .1371.60 IError - Orders an interrupt on errors .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ...1401.61 IF - If a condition is met, then ...; otherwise ... ..... .... .... ... .... .... .... .... .... .... .... ... .... .... ..1421.62 Incr - Increments by 1 ........ ........ ....... ........ ........ ....... ........ ........ ........ ....... ........ ...1441.63 IndAMove - Independent absolute position movement .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .1481.64 IndCMove - Independent continuous movement ...... .... .... .... .... .... ... .... .... .... .... .... .... .1521.65 IndDMove - Independent delta position movement ..... .... .... .... .... ... .... .... .... .... .... .... ..1551.66 IndReset - Independent reset ......... ....... ........ ........ ........ ....... ........ ........ ........ .......1601.67 IndRMove - Independent relative position movement ... .... .... .... .... .... .... .... ... .... .... .... .1641.68 InvertDO - Inverts the value of a digital output signal ..... .... .... .... .... .... ... .... .... .... .... ...1661.69 IOBusStart - Start of I/O bus ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ...1671.70 IOBusState - Get current state of I/O bus ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ..1701.71 IODisable - Deactivate an I/O unit ........... ........ ........ ....... ........ ........ ........ ....... ........

    1731.72 IOEnable - Activate an I/O unit ........ ........ ........ ....... ........ ........ ........ ....... ........ .......1751.73 IPers - Interrupt at value change of a persistent variable .. ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... ..1771.74 IRMQMessage - Orders RMQ interrupts for a data type ...... ... .... .... .... .... .... ... .... .... ....1811.75 ISignalAI - Interrupts from analog input signal ...... .... ... .... .... .... .... .... .... .... ... .... .... ....1911.76 ISignalAO - Interrupts from analog output signal .... .... .... ... .... .... .... .... .... .... ... .... .... ...1951.77 ISignalDI - Orders interrupts from a digital input signal .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .1981.78 ISignalDO - Interrupts from a digital output signal ..... .... .... .... ... .... .... .... .... .... .... .... ... .2011.79 ISignalGI - Orders interrupts from a group of digital input signals .... .. .. ... ... .. ... .. ... .. ... ..2041.80 ISignalGO - Orders interrupts from a group of digital output signals ... .. ... .. ... ... .. ... .. ... ..2071.81 ISleep - Deactivates an interrupt ..... ........ ....... ........ ........ ........ ....... ........ ........ .......2091.82 ITimer - Orders a timed interrupt ....... ....... ........ ........ ........ ....... ........ ........ ........ .....2111.83 IVarValue - orders a variable value interrupt .... .... .... .... .... .... .... ... .... .... .... .... .... .... ....2141.84 IWatch - Activates an interrupt ........ ....... ........ ........ ........ ....... ........ ........ ........ .......

    2161.85 Label - Line name ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ . 2171.86 Load - Load a program module during execution .... .... .... .... .... .... .... ... .... .... .... .... .... ..2211.87 LoadId - Load identification of tool or payload ...... .... .... ... .... .... .... .... .... .... .... ... .... .... .2261.88 MakeDir - Create a new directory ............ ........ ........ ....... ........ ........ ........ ....... .......2271.89 ManLoadIdProc - Load identification of IRBP manipulators ... .. ... ... .. ... .. ... ... .. ... .. ... .. ...2311.90 MechUnitLoad - Defines a payload for a mechanical unit .. ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .2351.91 MotionSup - Deactivates/Activates motion supervision ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. .2371.92 MoveAbsJ - Moves the robot to an absolute joint position .. ... .. ... .. ... .. ... ... .. ... .. ... ... .. ...2431.93 MoveC - Moves the robot circularly .... .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... .2511.94 MoveCDO - Moves the robot circularly and sets digital output in the corner .. .. .. .. .. .. .. .. ..2551.95 MoveCSync - Moves the robot circularly and executes a RAPID procedure .. .. .. .. .. .. .. .. ..2601.96 MoveExtJ - Move one or several mechanical units without TCP .. ... .. ... .. ... ... .. ... .. ... .. ...2631.97 MoveJ - Moves the robot by joint movement .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .2681.98 MoveJDO - Moves the robot by joint movement and sets digital output in the corner ... .. .

    2721.99 MoveJSync - Moves the robot by joint movement and executes a RAPID procedure .. .. ..2771.100 MoveL - Moves the robot linearly ..........................................................................2831.101 MoveLDO - Moves the robot linearly and sets digital output in the corner ... .. .. .. .. .. .. .. .. ..2871.102 MoveLSync - Moves the robot linearly and executes a RAPID procedure ... .. .. .. .. .. .. .. .. ..2921.103 MToolRotCalib - Calibration of rotation for moving tool ... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... .2951.104 MToolTCPCalib - Calibration of TCP for moving tool ................................................2981.105 Open - Opens a file or serial channel .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ..3031.106 OpenDir - Open a directory .................................................................................3051.107 PackDNHeader - Pack DeviceNet Header into rawbytes data ... ... .. ... .. ... .. ... ... .. ... .. ... ...3081.108 PackRawBytes - Pack data into rawbytes data ... .... .... .... .... ... .... .... .... .... .... .... .... ... ...3121.109 PathAccLim - Reduce TCP acceleration along the path .... ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .3161.110 PathRecMoveBwd - Move path recorder backwards ................................................3221.111 PathRecMoveFwd - Move path recorder forward ..... ... .... .... .... .... .... .... .... ... .... .... .... ..

    3251.112 PathRecStart - Start the path recorder ..... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ....

    6 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    7/1332

    3281.113 PathRecStop - Stop the path recorder .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .3311.114 PathResol - Override path resolution .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ..3331.115 PDispOff - Deactivates program displacement ... .... .... .... .... ... .... .... .... .... .... .... .... ... ..3341.116 PDispOn - Activates program displacement .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .

    3381.117 PDispSet - Activates program displacement using known frame .. .. ... .. ... ... .. ... .. ... .. ... .. 3401.118 ProcCall - Calls a new procedure ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....3421.119 ProcerrRecovery - Generate and recover from process-move error ............................3481.120 PulseDO - Generates a pulse on a digital output signal .. ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. .3511.121 RAISE - Calls an error handler .............................................................................3541.122 RaiseToUser - Propagates an error to user level .....................................................3571.123 ReadAnyBin - Read data from a binary serial channel or file .... .. ... .. ... .. ... ... .. ... .. ... .. ... .3601.124 ReadBlock - read a block of data from device ...... .... .... ... .... .... .... .... .... .... .... ... .... .... .3621.125 ReadCfgData - Reads attribute of a system parameter ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .3661.126 ReadErrData - Gets information about an error .... ... .... .... .... .... .... .... .... ... .... .... .... .... .3691.127 ReadRawBytes - Read rawbytes data ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...3721.128 RemoveDir - Delete a directory ............................................................................3741.129 RemoveFile - Delete a file ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ......3751.130 RenameFile - Rename a file ................................................................................

    3771.131 Reset - Resets a digital output signal ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ...3781.132 ResetPPMoved - Reset state for the program pointer moved in manual mode ... .. .. .. .. .. .3791.133 ResetRetryCount - Reset the number of retries .... .... .... .... .... ... .... .... .... .... .... .... .... ... .3801.134 RestoPath - Restores the path after an interrupt ......................................................3821.135 RETRY - Resume execution after an error .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ....3831.136 RETURN - Finishes execution of a routine .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ...3851.137 Rewind - Rewind file position ...............................................................................3871.138 RMQEmptyQueue - Empty RAPID Message Queue .................................................3891.139 RMQFindSlot - Find a slot identity from the slot name .... .. ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .3911.140 RMQGetMessage - Get an RMQ message ...... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .3941.141 RMQGetMsgData - Get the data part from an RMQ message .... ... .. ... .. ... .. ... ... .. ... .. ... ..3971.142 RMQGetMsgHeader - Get header information from an RMQ message .........................4001.143 RMQReadWait - Returns message from RMQ ...... .... .... .... ... .... .... .... .... .... .... .... ... .... .

    4031.144 RMQSendMessage - Send an RMQ data message ... .... ... .... .... .... .... .... .... .... ... .... .... . 4071.145 RMQSendWait - Send an RMQ data message and wait for a response ... .. .. .. .. .. .. .. .. .. .. .4121.146 Save - Save a program module ............................................................................4151.147 SCWrite - Send variable data to a client application ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... ... ..4181.148 SearchC - Searches circularly using the robot .... .... .... .... ... .... .... .... .... .... .... .... ... .... ..4271.149 SearchExtJ - Search with one or several mechanical units without TCP ... .. .. .. .. .. .. .. .. .. ..4341.150 SearchL - Searches linearly using the robot ..... .... .... .... ... .... .... .... .... .... .... .... ... .... ....4441.151 SenDevice - connect to a sensor device ..... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .4461.152 Set - Sets a digital output signal .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ..4481.153 SetAllDataVal - Set a value to all data objects in a defined set .. .. ... .. ... ... .. ... .. ... .. ... ... ..4501.154 SetAO - Changes the value of an analog output signal ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .4521.155 SetDataSearch - Define the symbol set in a search sequence ... ... ... .. ... .. ... .. ... ... .. ... .. ..4561.156 SetDataVal - Set the value of a data object ...... .... .... .... .... .... .... ... .... .... .... .... .... .... ....4591.157 SetDO - Changes the value of a digital output signal ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .

    4611.158 SetGO - Changes the value of a group of digital output signals ... .. ... .. ... .. ... ... .. ... .. ... ...4641.159 SetSysData - Set system data ..............................................................................4661.160 SingArea - Defines interpolation around singular points ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... ..4681.161 SkipWarn - Skip the latest warning ....... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ..4691.162 SocketAccept - Accept an incoming connection .. ... .... .... .... .... .... ... .... .... .... .... .... .... ..4721.163 SocketBind - Bind a socket to my IP-address and port .... .. .. ... ... .. ... .. ... ... .. ... .. ... .. ... ...4741.164 SocketClose - Close a socket ..............................................................................4761.165 SocketConnect - Connect to a remote computer .. ... .... .... .... .... .... .... ... .... .... .... .... .... .4791.166 SocketCreate - Create a new socket ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ....4811.167 SocketListen - Listen for incoming connections ......................................................4831.168 SocketReceive - Receive data from remote computer ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ..4881.169 SocketSend - Send data to remote computer ..... .... .... .... ... .... .... .... .... .... .... .... ... .... ...4921.170 SoftAct - Activating the soft servo ....... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .

    4941.171 SoftDeact - Deactivating the soft servo ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .

    3HAC16581-1 Revision: P 7 Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    8/1332

    4951.172 SpeedLimAxis - Set speed limitation for an axis ......................................................4991.173 SpeedLimCheckPoint - Set speed limitation for check points .... .. ... .. ... ... .. ... .. ... ... .. ... ..5041.174 SpeedRefresh - Update speed override for ongoing movement ... .. ... ... .. ... .. ... ... .. ... .. ...5071.175 SpyStart - Start recording of execution time data .....................................................

    5101.176 SpyStop - Stop recording of time execution data ..................................................... 5111.177 StartLoad - Load a program module during execution ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ..5151.178 StartMove - Restarts robot movement .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .5181.179 StartMoveRetry - Restarts robot movement and execution ... .. ... .. ... .. ... .. ... ... .. ... .. ... .. ..5211.180 STCalib - Calibrate a Servo Tool ..........................................................................5251.181 STClose - Close a Servo Tool ..............................................................................5281.182 StepBwdPath - Move backwards one step on path ..................................................5301.183 STIndGun - Sets the gun in independent mode ... .... .... .... ... .... .... .... .... .... .... .... ... .... ..5321.184 STIndGunReset - Resets the gun from independent mode .... ... .. ... ... .. ... .. ... .. ... ... .. ... ..5331.185 SToolRotCalib - Calibration of TCP and rotation for stationary tool .............................5361.186 SToolTCPCalib - Calibration of TCP for stationary tool .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .. ..5391.187 Stop - Stops program execution ...........................................................................5421.188 STOpen - Open a Servo Tool .......... ....... ........ ........ ........ ....... ........ ........ ........ .......5441.189 StopMove - Stops robot movement .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .

    5481.190 StopMoveReset - Reset the system stop move state ................................................5501.191 StorePath - Stores the path when an interrupt occurs ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ...5521.192 STTune - Tuning Servo Tool ................................................................................5561.193 STTuneReset - Resetting Servo tool tuning ..... ... .... .... .... .... .... ... .... .... .... .... .... .... .... .5571.194 SyncMoveOff - End coordinated synchronized movements .... ... .. ... ... .. ... .. ... .. ... ... .. ... .5631.195 SyncMoveOn - Start coordinated synchronized movements .... ... .. ... .. ... ... .. ... .. ... .. ... ...5691.196 SyncMoveResume - Set synchronized coordinated movements ... .. ... ... .. ... .. ... .. ... ... .. ..5711.197 SyncMoveSuspend - Set independent-semicoordinated movements ...........................5731.198 SyncMoveUndo - Set independent movements .... ... .... .... .... .... .... ... .... .... .... .... .... .... .5751.199 SystemStopAction - Stop the robot system .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ..5771.200 TEST - Depending on the value of an expression ... .. ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. .5791.201 TestSignDefine - Define test signal .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .5811.202 TestSignReset - Reset all test signal definitions ......................................................

    5821.203 TextTabInstall - Installing a text table ..... ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .. 5841.204 TPErase - Erases text printed on the FlexPendant ...................................................5851.205 TPReadDnum - Reads a number from the FlexPendant .... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .5881.206 TPReadFK - Reads function keys .........................................................................5921.207 TPReadNum - Reads a number from the FlexPendant .............................................5951.208 TPShow - Switch window on the FlexPendant ... .... .... .... .... .... .... ... .... .... .... .... .... .... ...5961.209 TPWrite - Writes on the FlexPendant ...... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .5991.210 TriggC - Circular robot movement with events ... ... .... .... .... .... .... ... .... .... .... .... .... .... ...6071.211 TriggCheckIO - Defines IO check at a fixed position .. ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ...6121.212 TriggEquip - Define a fixed position and time I/O event on the path .............................6181.213 TriggInt - Defines a position related interrupt .... .... .... .... ... .... .... .... .... .... .... .... ... .... ....6221.214 TriggIO - Define a fixed position or time I/O event near a stop point .. .. .. .. .. .. .. .. .. .. .. .. .. ..6271.215 TriggJ - Axis-wise robot movements with events .....................................................6341.216 TriggL - Linear robot movements with events ...... ... .... .... .... .... .... ... .... .... .... .... .... .... .

    6411.217 TriggLIOs - Linear robot movements with I/O events ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .6481.218 TriggRampAO - Define a fixed position ramp AO event on the path ............................

    6541.219 TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale

    event ..............................................................................................................6621.220 TriggStopProc - Generate restart data for trigg signals at stop ... .. ... .. ... .. ... ... .. ... .. ... .. ..6671.221 TryInt - Test if data object is a valid integer ... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...6691.222 TRYNEXT - Jumps over an instruction which has caused an error ... .. ... .. ... ... .. ... .. ... ... .6701.223 TuneReset - Resetting servo tuning .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ....6711.224 TuneServo - Tuning servos ...... ....... ........ ........ ........ ....... ........ ........ ........ ....... ......6771.225 UIMsgBox - User Message Dialog Box type basic ..... .... ... .... .... .... .... .... .... .... ... .... .... .6851.226 UIShow - User Interface show ..............................................................................6891.227 UnLoad - UnLoad a program module during execution ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. .6921.228 UnpackRawBytes - Unpack data from rawbytes data ...............................................

    6961.229 VelSet - Changes the programmed velocity ... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...

    8 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    9/1332

    6981.230 WaitAI - Waits until an analog input signal value is set .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .7011.231 WaitAO - Waits until an analog output signal value is set .... ... ... .. ... .. ... ... .. ... .. ... .. ... ... .7041.232 WaitDI - Waits until a digital input signal is set ..... .... .... ... .... .... .... .... .... .... .... ... .... .... .7061.233 WaitDO - Waits until a digital output signal is set .....................................................

    7081.234 WaitGI - Waits until a group of digital input signals are set .... ... .. ... ... .. ... .. ... ... .. ... .. ... .. 7121.235 WaitGO - Waits until a group of digital output signals are set .. ... ... .. ... .. ... ... .. ... .. ... .. ... .7161.236 WaitLoad - Connect the loaded module to the task ..................................................7201.237 WaitRob - Wait until stop point or zero speed ..... .... .... .... .... .... .... .... ... .... .... .... .... .... .7221.238 WaitSyncTask - Wait at synchronization point for other program tasks .. .. .. .. .. .. .. .. .. .. .. ..7261.239 WaitTestAndSet - Wait until variable unset - then set ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ...7291.240 WaitTime - Waits a given amount of time .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .7311.241 WaitUntil - Waits until a condition is met .... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... .7341.242 WaitWObj - Wait for work object on conveyor ..... .... .... .... ... .... .... .... .... .... .... .... ... .... ..7371.243 WarmStart - Restart the controller .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ..7381.244 WHILE - Repeats as long as ... .............................................................................7401.245 WorldAccLim - Control acceleration in world coordinate system .. ... .. ... .. ... ... .. ... .. ... ... ..7421.246 Write - Writes to a character-based file or serial channel .... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. .7451.247 WriteAnyBin - Writes data to a binary serial channel or file .... .. ... .. ... ... .. ... .. ... ... .. ... .. ...

    7481.248 WriteBin - Writes to a binary serial channel ...... ... .... .... .... .... .... .... ... .... .... .... .... .... ....7501.249 WriteBlock - write block of data to device ....... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ..7521.250 WriteCfgData - Writes attribute of a system parameter .. .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. ..7561.251 WriteRawBytes - Write rawbytes data .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ..7581.252 WriteStrBin - Writes a string to a binary serial channel .... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ...7601.253 WriteVar - write variable ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ........7621.254 WZBoxDef - Define a box-shaped world zone ..... .... .... ... .... .... .... .... .... .... .... ... .... .... ..7641.255 WZCylDef - Define a cylinder-shaped world zone ....................................................7671.256 WZDisable - Deactivate temporary world zone supervision ... .. ... ... .. ... .. ... .. ... ... .. ... .. ...7691.257 WZDOSet - Activate world zone to set digital output .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ..7731.258 WZEnable - Activate temporary world zone supervision .... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. ..7751.259 WZFree - Erase temporary world zone supervision ..................................................7771.260 WZHomeJointDef - Define a world zone for home joints ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .. ..

    7801.261 WZLimJointDef - Define a world zone for limitation in joints .... .. ... ... .. ... .. ... .. ... ... .. ... .. .. 7841.262 WZLimSup - Activate world zone limit supervision ...................................................7871.263 WZSphDef - Define a sphere-shaped world zone .. .... .... .... .... .... .... .... ... .... .... .... .... ....

    7892 Functions

    7892.1 Abs - Gets the absolute value ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... .7912.2 AbsDnum - Gets the absolute value of a dnum .... .... .... .... .... .... ... .... .... .... .... .... .... ....7932.3 ACos - Calculates the arc cosine value ........ ....... ........ ........ ........ ....... ........ ........ ....7942.4 AND - Evaluates a logical value ........ ........ ....... ........ ........ ........ ....... ........ ........ .....7962.5 AOutput - Reads the value of an analog output signal ...... ... .... .... .... .... .... .... .... ... .... ..7982.6 ArgName - Gets argument name ... ........ ........ ........ ....... ........ ........ ........ ....... ........8012.7 ASin - Calculates the arc sine value .............. ........ ........ ....... ........ ........ ........ ....... ..8022.8 ATan - Calculates the arc tangent value .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... .... ...

    8032.9 ATan2 - Calculates the arc tangent2 value .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ... 8042.10 BitAnd - Logical bitwise AND - operation on byte data .... .... .... ... .... .... .... .... .... .... .... ...8062.11 BitAndDnum - Logical bitwise AND - operation on dnum data .... .. .. ... ... .. ... .. ... ... .. ... .. ..8082.12 BitCheck - Check if a specified bit in a byte data is set ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .8102.13 BitCheckDnum - Check if a specified bit in a dnum data is set .. ... .. ... .. ... ... .. ... .. ... .. ... ..8122.14 BitLSh - Logical bitwise LEFT SHIFT - operation on byte .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .8142.15 BitLShDnum - Logical bitwise LEFT SHIFT - operation on dnum ... ... .. ... .. ... .. ... ... .. ... .. .8172.16 BitNeg - Logical bitwise NEGATION - operation on byte data .... ... ... .. ... .. ... .. ... ... .. ... .. ..8192.17 BitNegDnum - Logical bitwise NEGATION - operation on dnum data .... .. ... ... .. ... .. ... ... ..8212.18 BitOr - Logical bitwise OR - operation on byte data ... .... .... .... .... .... .... .... ... .... .... .... ....8232.19 BitOrDnum - Logical bitwise OR - operation on dnum data .... ... .. ... ... .. ... .. ... .. ... ... .. ... ..8252.20 BitRSh - Logical bitwise RIGHT SHIFT - operation on byte ... .. ... .. ... .. ... ... .. ... .. ... .. ... ... .8272.21 BitRShDnum - Logical bitwise RIGHT SHIFT - operation on dnum .... .. .. ... ... .. ... .. ... ... .. .8292.22 BitXOr - Logical bitwise XOR - operation on byte data .... ... .... .... .... .... .... .... .... ... .... ....

    8312.23 BitXOrDnum - Logical bitwise XOR - operation on dnum data .... ... ... .. ... .. ... .. ... ... .. ... .. .

    3HAC16581-1 Revision: P 9 Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    10/1332

    8332.24 ByteToStr - Converts a byte to a string data ...... ... .... .... .... .... .... ... .... .... .... .... .... .... ...8352.25 CalcJointT - Calculates joint angles from robtarget .... ... .... .... .... .... .... .... .... ... .... .... ....8392.26 CalcRobT - Calculates robtarget from jointtarget ...... .... .... .... .... ... .... .... .... .... .... .... ....8412.27 CalcRotAxFrameZ - Calculate a rotational axis frame .... .... .... ... .... .... .... .... .... .... ... .... .

    8452.28 CalcRotAxisFrame - Calculate a rotational axis frame ... ... .. ... .. ... .. ... ... .. ... .. ... .. ... ... .. .. 8492.29 CDate - Reads the current date as a string .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... ...8502.30 CJointT - Reads the current joint angles ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ...8522.31 ClkRead - Reads a clock used for timing .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ..8542.32 CorrRead - Reads the current total offsets .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...8552.33 Cos - Calculates the cosine value ....... ........ ........ ........ ....... ........ ........ ....... ........ ....8562.34 CPos - Reads the current position (pos) data .... .... ... .... .... .... .... .... .... ... .... .... .... .... ....8582.35 CRobT - Reads the current position (robtarget) data .... .... .... .... .... .... .... ... .... .... .... .... .8612.36 CSpeedOverride - Reads the current override speed ... .... .... .... .... .... .... .... ... .... .... .... .8632.37 CTime - Reads the current time as a string ... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ....8642.38 CTool - Reads the current tool data .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ....8662.39 CWObj - Reads the current work object data .... ... .... .... .... .... .... .... .... ... .... .... .... .... ....8682.40 DecToHex - Convert from decimal to hexadecimal ..... .... .... ... .... .... .... .... .... .... .... ... ....8692.41 DefAccFrame - Define an accurate frame ... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... ..

    8722.42 DefDFrame - Define a displacement frame .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...8752.43 DefFrame - Define a frame ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... .....8782.44 Dim - Obtains the size of an array ......... ........ ....... ........ ........ ........ ....... ........ ........ ..8802.45 Distance - Distance between two points .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... ..8822.46 DIV - Evaluates an integer division .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .8832.47 DnumToNum - Converts dnum to num .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....8852.48 DnumToStr - Converts numeric value to string ...... .... ... .... .... .... .... .... .... .... ... .... .... ....8872.49 DotProd - Dot product of two pos vectors .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .8892.50 DOutput - Reads the value of a digital output signal ...... .... ... .... .... .... .... .... .... .... ... .... .8912.51 EulerZYX - Gets euler angles from orient ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... ..8932.52 EventType - Get current event type inside any event routine ... .. ... ... .. ... .. ... .. ... ... .. ... .. .8952.53 ExecHandler - Get type of execution handler ...... .... .... .... .... .... ... .... .... .... .... .... .... .... .8962.54 ExecLevel - Get execution level ...... ........ ........ ........ ....... ........ ........ ....... ........ .......

    8972.55 Exp - Calculates the exponential value ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... . 8982.56 FileSize - Retrieve the size of a file ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ..9012.57 FileTime - Retrieve time information about a file ....... ... .... .... .... .... .... .... .... ... .... .... .... .9042.58 FSSize - Retrieve the size of a file system .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ....9072.59 GetMecUnitName - Get the name of the mechanical unit .. ... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .9082.60 GetModalPayLoadMode - Get the ModalPayLoadMode value .. ... ... .. ... .. ... .. ... ... .. ... .. ...9092.61 GetNextMechUnit - Get name and data for mechanical units .... .. ... .. ... ... .. ... .. ... ... .. ... ..9122.62 GetNextSym - Get next matching symbol .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .9142.63 GetServiceInfo - Get service information from the system ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... ..9162.64 GetSysInfo - Get information about the system ...... ... .... .... .... .... .... ... .... .... .... .... .... ...9192.65 GetTaskName - Gets the name and number of current task .... ... .. ... ... .. ... .. ... ... .. ... .. ... .9212.66 GetTime - Reads the current time as a numeric value .... .... .... .... ... .... .... .... .... .... .... ....9232.67 GInputDnum - Read value of group input signal ...... .... ... .... .... .... .... .... .... .... ... .... .... ..9252.68 GOutput - Reads the value of a group of digital output signals ... .. ... .. ... ... .. ... .. ... ... .. ... .

    9272.69 GOutputDnum - Read value of group output signal .... .... ... .... .... .... .... .... .... .... ... .... ....9302.70 HexToDec - Convert from hexadecimal to decimal ...... .... .... .... .... ... .... .... .... .... .... .... ..9312.71 IndInpos - Independent axis in position status ...... .... .... .... .... ... .... .... .... .... .... .... .... ...9332.72 IndSpeed - Independent speed status ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ..9352.73 IOUnitState - Get current state of I/O unit .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .9382.74 IsFile - Check the type of a file .......... ....... ........ ........ ........ ....... ........ ........ ........ .....9422.75 IsMechUnitActive - Is mechanical unit active ...... .... .... .... .... .... .... ... .... .... .... .... .... .... .9432.76 IsPers - Is persistent ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ .....9442.77 IsStopMoveAct - Is stop move flags active .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ...9462.78 IsStopStateEvent - Test whether moved program pointer .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .. .9482.79 IsSyncMoveOn - Test if in synchronized movement mode .. ... .. ... .. ... ... .. ... .. ... .. ... ... .. ...9502.80 IsSysId - Test system identity ............. ........ ....... ........ ........ ........ ....... ........ ........ ...9512.81 IsVar - Is variable ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ .

    9522.82 MaxRobSpeed - Maximum robot speed .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ...

    10 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    11/1332

    9532.83 MirPos - Mirroring of a position ......... ....... ........ ........ ........ ....... ........ ........ ........ .....9552.84 MOD - Evaluates an integer modulo ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... .9562.85 ModExist - Check if program module exist ... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ....9572.86 ModTime - Get file modify time for the loaded module .... .... .... .... ... .... .... .... .... .... .... ...

    9592.87 MotionPlannerNo - Get connected motion planner number ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. 9612.88 NonMotionMode - Read the Non-Motion execution mode ... .. ... .. ... ... .. ... .. ... ... .. ... .. ... .. .9632.89 NOT - Inverts a logical value ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ..9642.90 NOrient - Normalize orientation ...... ........ ........ ....... ........ ........ ........ ....... ........ ........9662.91 NumToDnum - Converts num to dnum .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ....9672.92 NumToStr - Converts numeric value to string .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...9692.93 Offs - Displaces a robot position ....... ........ ........ ....... ........ ........ ........ ....... ........ .....9712.94 OpMode - Read the operating mode .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ...9722.95 OR - Evaluates a logical value .......... ........ ........ ........ ....... ........ ........ ........ ....... .....9732.96 OrientZYX - Builds an orient from euler angles ... .... .... .... .... .... .... .... ... .... .... .... .... .... ..9752.97 ORobT - Removes the program displacement from a position .... ... .. ... ... .. ... .. ... ... .. ... .. .9772.98 ParIdPosValid - Valid robot position for parameter identification .. .. ... ... .. ... .. ... ... .. ... .. ..9802.99 ParIdRobValid - Valid robot type for parameter identification .... .. ... .. ... .. ... .. ... ... .. ... .. ...9832.100 PathLevel - Get current path level ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....

    9852.101 PathRecValidBwd - Is there a valid backward path recorded ... .. ... .. ... .. ... ... .. ... .. ... ... .. ..9882.102 PathRecValidFwd - Is there a valid forward path recorded .... .. ... .. ... .. ... .. ... ... .. ... .. ... ... .9922.103 PFRestart - Check interrupted path after power failure .. .. ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ..9932.104 PoseInv - Inverts pose data .................................................................................9952.105 PoseMult - Multiplies pose data ...........................................................................9972.106 PoseVect - Applies a transformation to a vector .... .... .... ... .... .... .... .... .... .... .... ... .... ....

    10012.107 Pow - Calculates the power of a value ...... ... .... .... .... .... .... .... ... .... .... .... .... .... .... ... ....10022.108 PowDnum - Calculates the power of a value .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .10032.109 PPMovedInManMode - Test whether the program pointer is moved in manual mode .... .10042.110 Present - Tests if an optional parameter is used ......................................................10062.111 ProgMemFree - Get the size of free program memory .. .. ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ...10072.112 RawBytesLen - Get the length of rawbytes data ... .... .... .... .... .... ... .... .... .... .... .... .... ....10092.113 ReadBin - Reads a byte from a file or serial channel .... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .. ... ...

    10112.114 ReadDir - Read next entry in a directory .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .. 10142.115 ReadMotor - Reads the current motor angles ..... .... .... .... .... .... .... .... ... .... .... .... .... .... ..10162.116 ReadNum - Reads a number from a file or serial channel ... .. ... ... .. ... .. ... ... .. ... .. ... .. ... ...10192.117 ReadStr - Reads a string from a file or serial channel .... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... ..10232.118 ReadStrBin - Reads a string from a binary serial channel or file .... .. ... .. ... .. ... ... .. ... .. ... .10252.119 ReadVar - Read variable from a device ...... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ..10272.120 RelTool - Make a displacement relative to the tool ...................................................10292.121 RemainingRetries - Remaining retries left to do ......................................................10302.122 RMQGetSlotName - Get the name of an RMQ client .................................................10322.123 RobName - Get the TCP robot name .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...10342.124 RobOS - Check if execution is on RC or VC ..... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .10352.125 Round - Round a numeric value ...........................................................................10372.126 RoundDnum - Round a numeric value ...... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...10392.127 RunMode - Read the running mode .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ....

    10412.128 Sin - Calculates the sine value .............................................................................10422.129 SocketGetStatus - Get current socket state ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ..10452.130 Sqrt - Calculates the square root value .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ....10462.131 SqrtDnum - Calculates the square root value ..... ... .... .... .... .... .... .... .... ... .... .... .... .... ...10472.132 STCalcForce - Calculate the tip force for a Servo Tool ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. ... .. ..10482.133 STCalcTorque - Calculate the motor torque for a servo tool ... .. ... ... .. ... .. ... .. ... ... .. ... .. ...10492.134 STIsCalib - Tests if a servo tool is calibrated ...... .... ... .... .... .... .... .... .... .... ... .... .... .... ..10512.135 STIsClosed - Tests if a servo tool is closed ...... .... .... .... .... .... ... .... .... .... .... .... .... ... ....10532.136 STIsIndGun - Tests if a servo tool is in independent mode ... .. .. ... ... .. ... .. ... .. ... ... .. ... .. ..10542.137 STIsOpen - Tests if a servo tool is open ..... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .10562.138 StrDigCalc - Arithmetic operations with datatype stringdig .... ... .. ... .. ... .. ... ... .. ... .. ... .. ...10592.139 StrDigCmp - Compare two strings with only digits ...................................................10622.140 StrFind - Searches for a character in a string ..... .... .... .... .... .... ... .... .... .... .... .... .... .... ..

    10642.141 StrLen - Gets the string length .............................................................................

    3HAC16581-1 Revision: P 11 Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    12/1332

    10652.142 StrMap - Maps a string ............ ....... ........ ........ ........ ....... ........ ........ ........ ....... ......10672.143 StrMatch - Search for pattern in string ...... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ...10692.144 StrMemb - Checks if a character belongs to a set ....................................................10712.145 StrOrder - Checks if strings are ordered ..... ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ..

    10732.146 StrPart - Finds a part of a string .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... . 10752.147 StrToByte - Converts a string to a byte data ..... .... .... .... .... .... .... ... .... .... .... .... .... .... ...10772.148 StrToVal - Converts a string to a value ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .10792.149 Tan - Calculates the tangent value .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... ...10802.150 TaskRunMec - Check if task controls any mechanical unit ... ... .. ... .. ... .. ... ... .. ... .. ... ... .. .10812.151 TaskRunRob - Check if task controls some robot ....................................................10822.152 TasksInSync - Returns the number of synchronized tasks .. ... ... .. ... .. ... ... .. ... .. ... .. ... ... .10842.153 TestAndSet - Test variable and set if unset .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ..10872.154 TestDI - Tests if a digital input is set .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...10882.155 TestSignRead - Read test signal value .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ....10902.156 TextGet - Get text from system text tables .... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ..10922.157 TextTabFreeToUse - Test whether text table is free .... .. ... .. ... ... .. ... .. ... .. ... ... .. ... .. ... .. ..10942.158 TextTabGet - Get text table number ...... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ..10962.159 Trunc - Truncates a numeric value .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... .

    10982.160 TruncDnum - Truncates a numeric value ..... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ....11002.161 Type - Get the data type name for a variable ..... ... .... .... .... .... .... .... .... ... .... .... .... .... ...11022.162 UIAlphaEntry - User Alpha Entry ..........................................................................11082.163 UIClientExist - Exist User Client ...........................................................................11092.164 UIDnumEntry - User Number Entry .......................................................................11152.165 UIDnumTune - User Number Tune ........................................................................11212.166 UIListView - User List View .................................................................................11282.167 UIMessageBox - User Message Box type advanced .................................................11352.168 UINumEntry - User Number Entry .........................................................................11412.169 UINumTune - User Number Tune .........................................................................11472.170 ValidIO - Valid I/O signal to access ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ..11482.171 ValToStr - Converts a value to a string ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .11502.172 VectMagn - Magnitude of a pos vector ..... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... ...

    11522.173 XOR - Evaluates a logical value ...........................................................................11533 Data types

    11533.1 aiotrigg - Analog I/O trigger condition ........ ....... ........ ........ ........ ....... ........ ........ ......11553.2 ALIAS - Assigning an alias data type ........ ....... ........ ........ ........ ....... ........ ........ .......11563.3 bool - Logical values ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... .....11573.4 btnres - Push button result data ........ ........ ....... ........ ........ ........ ....... ........ ........ .....11593.5 busstate - State of I/O bus ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ .....11603.6 buttondata - Push button data ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .11623.7 byte - Integer values 0 - 255 ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ...11633.8 clock - Time measurement ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....11643.9 confdata - Robot configuration data .............. ........ ....... ........ ........ ........ ....... ........ ..11693.10 corrdescr - Correction generator descriptor .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ..

    11713.11 datapos - Enclosing block for a data object ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... .. 11723.12 dionum - Digital values (0 - 1) ............... ....... ........ ........ ....... ........ ........ ........ ....... ..11733.13 dir - File directory structure ........... ....... ........ ........ ........ ....... ........ ........ ........ ....... .11743.14 dnum - Double numeric values ........ ....... ........ ........ ........ ....... ........ ........ ........ ......11763.15 errdomain - Error domain ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ......11783.16 errnum - Error number ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ..11853.17 errstr - Error string ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ .......11863.18 errtype - Error type ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... .......11873.19 event_type - Event routine type ........ ....... ........ ........ ........ ....... ........ ........ ........ ......11883.20 exec_level - Execution level ......... ........ ....... ........ ........ ........ ....... ........ ........ ........ .11893.21 extjoint - Position of external joints .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .11913.22 handler_type - Type of execution handler .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ....11923.23 icondata - Icon display data ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ....11943.24 identno - Identity for move instructions .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....

    11963.25 intnum - Interrupt identity ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ .......

    12 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    13/1332

    11983.26 iodev - Serial channels and files ........ ....... ........ ........ ........ ....... ........ ........ ........ .....11993.27 iounit_state - State of I/O unit .............. ....... ........ ........ ........ ....... ........ ........ ........ ..12003.28 jointtarget - Joint position data ........... ........ ....... ........ ........ ........ ....... ........ ........ ....12023.29 listitem - List item data structure .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... .... ....

    12033.30 loaddata - Load data ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ..... 12093.31 loadidnum - Type of load identification .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .... ....12103.32 loadsession - Program load session .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ...12113.33 mecunit - Mechanical unit ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ......12133.34 motsetdata - Motion settings data .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ....12183.35 num - Numeric values ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ...12203.36 opcalc - Arithmetic Operator ......... ........ ........ ....... ........ ........ ....... ........ ........ ........ .12213.37 opnum - Comparison operator .......... ........ ....... ........ ........ ........ ....... ........ ........ .....12223.38 orient - Orientation ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .......12273.39 paridnum - Type of parameter identification ...... ... .... .... .... .... .... .... .... ... .... .... .... .... ...12293.40 paridvalidnum - Result of ParIdRobValid ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ...12313.41 pathrecid - Path recorder identifier ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ..12333.42 pos - Positions (only X, Y and Z) .............. ....... ........ ........ ........ ....... ........ ........ ......12353.43 pose - Coordinate transformations ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...

    12363.44 progdisp - Program displacement .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... ...12383.45 rawbytes - Raw data ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....12403.46 restartdata - Restart data for trigg signals ....... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .12443.47 rmqheader - RAPID Message Queue Message header ...... .... .... .... .... ... .... .... .... .... ....12463.48 rmqmessage - RAPID Message Queue message .... .... .... .... .... .... .... ... .... .... .... .... .... ..12483.49 rmqslot - Identity number of an RMQ client .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ..12493.50 robjoint - Joint position of robot axes .... .... .... .... .... .... ... .... .... .... .... .... .... ... .... .... .... ..12503.51 robtarget - Position data ........ ........ ........ ....... ........ ........ ....... ........ ........ ........ .......12533.52 shapedata - World zone shape data .... .... .... ... .... .... .... .... .... .... ... .... .... .... .... .... .... ....12553.53 signalxx - Digital and analog signals .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ...12573.54 socketdev - Socket device ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... .....12583.55 socketstatus - Socket communication status .... .... ... .... .... .... .... .... .... .... ... .... .... .... ....12593.56 speeddata - Speed data ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ........

    12633.57 stoppointdata - Stop point data ....... ........ ........ ........ ....... ........ ........ ....... ........ ....... 12693.58 string - Strings ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .....12713.59 stringdig - String with only digits ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .12723.60 switch - Optional parameters ....... ........ ........ ........ ....... ........ ........ ........ ....... ........ .12733.61 symnum - Symbolic number ............. ....... ........ ........ ........ ....... ........ ........ ........ .....12743.62 syncident - Identity for synchronization point .... ... .... .... .... .... .... .... .... ... .... .... .... .... ....12753.63 System data - Current RAPID system data settings ..... .... ... .... .... .... .... .... .... .... ... .... ..12773.64 taskid - Task identification ......... ........ ........ ........ ....... ........ ........ ........ ....... ........ ...12783.65 tasks - RAPID program tasks ........... ........ ........ ....... ........ ........ ........ ....... ........ ......12803.66 testsignal - Test signal ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ..12813.67 tooldata - Tool data ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ .......12873.68 tpnum - FlexPendant window number .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... ... ..12883.69 trapdata - Interrupt data for current TRAP ... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .12903.70 triggdata - Positioning events, trigg .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .

    12913.71 triggios - Positioning events, trigg ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... ...12943.72 triggiosdnum - Positioning events, trigg ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ....12963.73 triggstrgo - Positioning events, trigg .... .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .... ...12993.74 tunetype - Servo tune type ........ ........ ........ ....... ........ ........ ........ ....... ........ ........ ....13003.75 uishownum - Instance ID for UIShow .... .... .... .... .... .... .... ... .... .... .... .... .... .... .... ... .... ..13013.76 wobjdata - Work object data ........... ........ ....... ........ ........ ........ ....... ........ ........ .......13053.77 wzstationary - Stationary world zone data .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... ....13073.78 wztemporary - Temporary world zone data ... .... .... .... .... .... ... .... .... .... .... .... .... .... ... ....13093.79 zonedata - Zone data ....... ........ ........ ....... ........ ........ ........ ....... ........ ........ ........ ....

    13174 Programming type examples

    13174.1 ERROR handler with movements ....... ........ ........ ........ ....... ........ ........ ........ ....... ....13204.2 Service routines with or without movements .... .... ... .... .... .... .... .... .... .... ... .... .... .... .... .

    13234.3 System I/O interrupts with or without movements .... .... .... .... .... .... .... ... .... .... .... .... .... .

    3HAC16581-1 Revision: P 13 Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    14/1332

    13264.4 TRAP routines with movements ....... ........ ........ ....... ........ ........ ........ ....... ........ ......

    1329Index

    14 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Table of contents

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    15/1332

    Overview of this manual

    About this manual

    This is a technical reference manual intended for the RAPID programmer. TheRAPID base instructions, functions and data types are detailed in this manual.

    Usage

    This manual should be read during programming and when you need specificinformation about a RAPID instruction, function or data type.

    Who should read this manual?

    This manual is intended for someone with some previous experience inprogramming, for example, a robot programmer.

    PrerequisitesThe 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:

    ContentsChapter

    Detailed descriptionsof allRAPID base instruc-tions, including examples of how to use them.

    1 Instructions

    Detailed descriptions of all RAPID base func-tions, including examples of how to use them.

    2 Functions

    Detailed descriptions of all RAPID base datatypes, includingexamples of howto use them.

    3 Data types

    A general view of how to write program codethat contains different instructions/func-tions/data types. The chapter contains alsoprogramming tips and explanations.

    4 Programming type examples

    References

    Document IDReference

    3HAC029364-001Operating manual - Introduction to RAPID

    3HAC16580-1Technical reference manual - RAPID over-view

    3HAC16585-1Technical reference manual - RAPID kernel

    Revisions

    DescriptionRevision

    7th edition. RobotWare 5.10.FNew chapter added, 4 Programming type examples.

    Continues on next page

    3HAC16581-1 Revision: P 15 Copyright 2004-2013 ABB. All rights reserved.

    Overview of this manual

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    16/1332

    DescriptionRevision

    8th edition. RobotWare 5.11.GNew instructions, functionsanddata types areadded.Also a new program-

    ming type example is added.9th edition. RobotWare 5.12.HNew instructions, functions and data types are added.

    10th edition. RobotWare 5.13.JThe following new instructions, functions and data types are added:

    TPReadNum - Reads a number from the FlexPendant on page 592

    Type - Get the data type name for a variable on page 1100

    UIDnumEntry - User Number Entry on page 1109

    UIDnumTune - User Number Tune on page 1115 triggiosdnum - Positioning events, trigg on page 1294

    Updated safety signal graphics for the levels DangerandWarning.

    11th edition. RobotWare 5.14.KThe following new functions are added:

    AbsDnum - Gets the absolute value of a dnum on page 791

    DnumToStr - Converts numeric value to string on page 885

    GetServiceInfo - Get service information from the system on page 914

    PowDnum - Calculates the power of a value on page 1002 RoundDnum - Round a numeric value on page 1037 SqrtDnum - Calculates the square root value on page 1046 TruncDnum - Truncates a numeric value on page 1098

    12th edition. RobotWare 5.14.02.LUpdates related to the stationary case and the relation of the different co-

    ordinate systems in the following data types: loaddata - Load data on page 1203 tooldata - Tool data on page 1281

    Miscellaneous updates in the following instructions: GripLoad - Defines the payload for a robot on page 130

    MechUnitLoad - Defines a payload for a mechanical unit on page 231

    13th edition. RobotWare 5.14.03. Bit functions are added for dnum: BitAndDnum, BitCheckDnum,

    BitLshDnum, BitNegDnum, BitOrDnum, BitRshDnum, andBitXorDnum.

    Instructions BitClearand BitSetare updated to support dnumdata.

    Total Load (TLoad) argument added to all movement instructions:MoveAbsJ, MoveC, MoveCDO, MoveCSync, MoveJ, MoveJDO,MoveJSync, MoveL, MoveLDO, MoveL, SyncSearchC,SearchL, TriggC, TriggJ, TriggL, TriggLIOs.

    A new error handler, ERR_SIG_NOT_VALID, is added to followingI/O instructions: AOutput, DOutput, GInputDnum, GOutput,GOutputDnum, InvertDO, ProcErrRecovery, PulseDO,Reset, Set, SetDO, SetGO, WaitAI, WaitAO, WaitDI,WaitDO, WaitGI, WaitGO.

    GetSysDataand SetSysDatamodified for new total load concept.

    M

    14th edition. RobotWare 5.15. Minor corrections Instructions SpeedLimAxisand SpeedLimCheckPointare added

    N

    Continues on next page

    16 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    Overview of this manual

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    17/1332

    DescriptionRevision

    15th edition. RobotWare 5.15.01 The information about when the default value is set, is changed from

    cold start to either warm start, P-Start, or I-Start for following instruc-tions, functions, and data types:AccSet, ActEventBuffer, CirPathMode, ConfJ, ConfL,DeactEventBuffer, DitherDeact, EOffsOn, EOffsSet,GripLoad, IDisable, MotionSup, motsetdata,PathAccLim, PathResol, DispOn, PDispSet, progdisp,SingArea, SpeedLimAxis, SpeedLimCheckPoint, STTune,STTuneReset, SyncMoveUndo, TextTabFreeToUse,TextTabInstall, TuneReset, TuneServo, VelSet,WorldAccLim

    The list of supportedrobot models has been updated for the instruc-tion WorldAccLim.

    The list of supported robot models has been updated for the datatypeconfdata.

    The data type errnum has been updated with error handling for Integ-rated Vision. The errors start with ERR_CAM. Following instructions, functions, and data types are added:

    ALIAS, AND, DIV, MOD, NOT, OR, XOR

    P

    3HAC16581-1 Revision: P 17 Copyright 2004-2013 ABB. All rights reserved.

    Overview of this manual

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    18/1332

    This page is intentionally left blank

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    19/1332

    1 Instructions

    1.1 AccSet - Reduces the acceleration

    Usage

    AccSetis used when handling fragile loads. It allows slower acceleration anddeceleration, which results in smoother robot movements.

    This instruction can only be used in the main task T_ROB1or, if in a MultiMovesystem, in Motion tasks.

    Basic examples

    The following examples illustrate the instruction AccSet:

    Example 1AccSet 50, 100;

    The acceleration is limited to 50% of the normal value.

    Example 2AccSet 100, 50;

    The acceleration ramp is limited to 50% of the normal value.

    ArgumentsAccSet 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 thenormal values. Jerking can be restricted by reducing this value. 100%correspondsto maximum rate. Maximum value: 100%. Input value < 10% gives 10% of maximumrate.

    Continues on next page

    3HAC16581-1 Revision: P 19 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.1 AccSet - Reduces the acceleration

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    20/1332

    The figures show that reducing the acceleration results in smoother movements.

    Ti

    xx0500002146

    Program execution

    The acceleration applies to both the robot and external axes until a new AccSetinstruction is executed.

    The default values (100%) are automatically set

    at a P-Start.

    when a new program is loaded.

    when starting program execution from the beginning.

    SyntaxAccSet

    [ Acc ':=' ] < expression (IN) of num> ','

    [ Ramp ':=' ] < expression (IN) of num > ';'

    Related information

    SeeFor information about

    WorldAccLim - Control acceleration in world co-

    ordinate system on page 740

    Controlacceleration in world coordinate

    systemPathAccLim - Reduce TCP acceleration along thepath on page 312

    ReduceTCPacceleration along thepath

    Technical reference manual - RAPID overviewPositioning instructions

    motsetdata - Motion settings data on page 1213Motion settings data

    20 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.1 AccSet - Reduces the acceleration

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    21/1332

    1.2 ActEventBuffer - Activation of event buffer

    Description

    ActEventBufferis used to activate the use of the event buffer in current motionprogram task.

    The instructionsActEventBuffer and DeactEventBuffer shouldbe used whencombining an application using finepoints and a continuous application wheresignals needs to be set in advance due to slow process equipment.

    This instruction can only be used in the main task T_ROB1or, if in a MultiMovesystem, in Motion tasks.

    Basic examples

    The following example illustrates the instruction ActEventBuffer:

    Example 1..

    DeactEventBuffer;

    ! Use an application that uses finepoints, such as SpotWelding

    ..

    ! Activate the event buffer again

    ActEventBuffer;

    ! Now it is possible to use an application that needs

    ! to set signals in advance, such as Dispense

    ..

    The DeactEventBufferdeactivates the configured event buffer. When using anapplication with finepoints, the start of the robot from the finepoint will be faster.When activating theevent buffer with ActEventBuffer, it is possible to set signalsin advance for an application with slow process equipment.

    Program execution

    The use of an event buffer applies for the next executed robot movement of anytype, and is valid until a DeactEventBufferinstruction is executed.

    The instruction will wait until the robot and external axes has reached the stoppoint (ToPointof current move instruction) before the activation of the eventbuffer.Therefore it is recommended to program the movement instruction preceding

    ActEventBufferwith a fine point.The default value (use event buffer = TRUE) is automatically set

    at a P-Start.

    when a new program is loaded.

    when starting program execution from the beginning.

    Limitations

    ActEventBuffer cannot be executed in a RAPID routine connected to any of thefollowing special system events: PowerOn, Stop, QStop, Restart or Step.

    Continues on next page

    3HAC16581-1 Revision: P 21 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.2 ActEventBuffer - Activation of event buffer

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    22/1332

    SyntaxActEventBuffer ;

    Related informationSeeFor information about

    DeactEventBuffer - Deactivation of event bufferon page 88

    Deactivation of event buffer

    Technical reference manual - System parametersConfiguration of Event preset time

    motsetdata - Motion settings data on page 1213Motion settings data

    22 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.2 ActEventBuffer - Activation of event buffer

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    23/1332

    1.3 ActUnit - Activates a mechanical unit

    Usage

    ActUnitis used to activate a mechanical unit.It can be used to determine which unit is to be active when, for example, commondrive units are used.

    This instruction can only be used in the main task T_ROB1or, if in a MultiMovesystem, in Motion tasks.

    Basic examples

    The following example illustrates the instruction ActUnit:

    Example 1ActUnit orbit_a;

    Activation of the orbit_amechanical unit.

    ArgumentsActUnit MechUnit

    MechUnit

    Mechanical Unit

    Data type: mecunit

    The name of the mechanical unit to be activated.

    Program executionWhen the robotsand the actual path of external axes are ready, the path on currentpath level is cleared and the specified mechanical unit is activated. This meansthat it is controlled and monitored by the robot.

    If several mechanical units share a common drive unit, activation of one of thesemechanical 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 beprogrammed with a stop point (zonedatafine), not a fly-by point, otherwise restartafter power failure will not be possible.

    ActUnit cannot be executed in a RAPID routine connected to any of the followingspecial system events: PowerOn, Stop, QStop, Restart, Reset or Step.

    It is possible to use ActUnit- DeactUniton StorePathlevel, but the samemechanical units must be active when doing RestoPath as whenStorePath wasdone. Such operation on the Path Recorder and the path on the base level will beintact, but the path on the StorePathlevel will be cleared.

    SyntaxActUnit

    [MechUnit ':=' ] < variable (VAR) of mecunit> ';'

    Continues on next page

    3HAC16581-1 Revision: P 23 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.3 ActUnit - Activates a mechanical unit

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    24/1332

    Related information

    SeeFor information about

    DeactUnit - Deactivates a mechanical unit on page 90Deactivating mechanical units

    mecunit - Mechanical unit on page 1211Mechanical units

    DeactUnit - Deactivates a mechanical unit on page 90More examples

    PathRecMoveBwd - Move path recorder backwards onpage 316

    Path Recorder

    24 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.3 ActUnit - Activates a mechanical unit

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    25/1332

    1.4 Add - Adds a numeric value

    Usage

    Addis used to add or subtract a value to or from a numeric variable or persistent.

    Basic examples

    The following examples illustrate the instruction Add:

    Example 1Add reg1, 3;

    3is added to reg1, that is,reg1:=reg1+3.

    Example 2Add reg1, -reg2;

    The value of reg2is subtracted from reg1, that is,reg1:=reg1-reg2.Example 3

    VAR dnum mydnum:=5;

    Add mydnum, 500000000;

    500000000is added to mydnum, that is,mynum:=mynum+500000000.

    Example 4VAR dnum mydnum:=5000;

    VAR num mynum:=6000;

    Add mynum, DnumToNum(mydnum \Integer);

    5000 is added tomynum, that is, mynum:=mynum+5000.Youhavetouse DnumToNum

    to get a num numeric value that you can use together with the num variable mynum.

    ArgumentsAdd 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

    3HAC16581-1 Revision: P 25 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.4 Add - Adds a numeric value

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    26/1332

    Limitations

    If the value to be added is of the type dnum, and the variable/persistent that shouldbe 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).

    SyntaxAdd

    [ 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

    SeeFor information about

    Incr - Increments by 1 on page 142Incrementing a variable by 1

    Decr - Decrements by 1 on page 92Decrementing a variable by 1

    ":=" - Assigns a value on page 30Changing data using an arbitrary expres-sion, for example, multiplication

    26 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.4 Add - Adds a numeric value

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    27/1332

    1.5 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 signalsin built-in task modules.

    Signals with alias names can be used for predefined generic programs, withoutany modification of the program before running in different robot installations.

    The instruction AliasIO must be run before any use of the actual signal. SeeBasic examples on page 27for loaded modules, and More examples on page 28for installed modules.

    Basic examples

    The following example illustrates the instruction AliasIO:

    See alsoMore examples on page 28.

    Example 1VAR signaldo alias_do;

    PROC prog_start()

    AliasIO config_do, alias_do;

    ENDPROC

    The routine prog_startis connected to the STARTevent in system parameters.Theprogram defining digital output signal alias_do is connectedto the configureddigital output signal config_doat program start.

    ArgumentsAliasIO 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/Oconfiguration.

    Installed modules or loaded modules:

    A reference (CONST, VARor parameter of these) containing the name of the signal(data type string) from which the signal descriptor after search in the system iscopied. 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 thesignal descriptor is copied. The signal must be declared in the RAPID program.

    The same data type must be used (or found) for the arguments FromSignalandToSignal andmustbeoneoftype signalxx (signalai, signalao, signaldi,signaldo, signalgi, or signalgo).

    Continues on next page

    3HAC16581-1 Revision: P 27 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.5 AliasIO - Define I/O signal with alias name

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    28/1332

    Program execution

    The signal descriptor value is copied from the signal given in argument FromSignalto the signal given in argument ToSignal.

    Error handling

    The following recoverable errors are generated and can be handled in an errorhandler. The system variable ERRNOwill be set to:

    The FromSignalis not defined in the IO configurationERR_ALIASIO_DEF

    or theToSignalis not declared in the RAPID program

    or the ToSignal is defined in the IO configuration.

    The data types for the arguments FromSignal andToSignalis not the same type.

    ERR_ALIASIO_TYPE

    More examplesMore examples of the instruction AliasIOare illustrated below.

    Example 1VAR 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 STARTevent in system parameters.The program defined digital input signalalias_di is connected to the configureddigital input signal config_di(via constant config_string) at program start.

    Limitation

    When starting the program, the alias signal cannot be used until the AliasIOinstruction is executed.

    Instruction AliasIOmustbe 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 thesignal)

    To prevent mistakes it is not recommended to use dynamic reconnection of an

    AliasIOsignal to different physical signals.

    SyntaxAliasIO

    [ FromSignal ':=' ] < reference (REF) of anytype> ','

    [ ToSignal ':=' ] < variable (VAR) of anytype> ';'

    Related information

    SeeFor information about

    Technical reference manual - RAPID overviewInput/Output instructions

    Technical reference manual - RAPID overviewInput/Output functionality in general

    Technical reference manual - System parametersConfiguration of I/O

    Continues on next page

    28 3HAC16581-1 Revision: P Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.5 AliasIO - Define I/O signal with alias name

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions and Data Types

    29/1332

    SeeFor information about

    Technical reference manual - System parametersDefining event routines

    Technical reference manual - System parametersLoaded/Installed task modules

    3HAC16581-1 Revision: P 29 Copyright 2004-2013 ABB. All rights reserved.

    1 Instructions

    1.5 AliasIO - Define I/O signal with alias name

    Continued

  • 7/25/2019 ABB RAPID Instructions, Functions