ABB Robot Reference
Free reference guide: ABB Robot Reference
About ABB Robot Reference
The ABB Robot RAPID Reference is a searchable programming guide for ABB industrial robots, covering the RAPID language used across the entire ABB robot family including IRB series articulated arms, SCARA robots, and delta robots. RAPID is the proprietary programming language executed by the IRC5 and OmniCore controllers, and this reference provides instant access to motion instructions, data type declarations, control flow statements, I/O handling, and advanced features like interrupt traps and error handlers.
This reference organizes RAPID syntax into six categories: Motion commands (MoveL, MoveJ, MoveC, MoveAbsJ, ConfL, SearchL), Data Types (robtarget, tooldata, wobjdata, speeddata, zonedata), Control Flow (IF/THEN, FOR, WHILE, TEST/CASE, PROC, FUNC), I/O Instructions (SetDO, WaitDI, SetAO, TPWrite, WaitTime), RobotStudio operations (TCP calibration, station creation, virtual controllers, Smart Components, Pack & Go), and Advanced features (TRAP interrupt handlers, ERROR handlers, Offs position offset).
Every entry includes the exact RAPID syntax, a practical description, and a copy-ready code example that works in both RobotStudio simulation and real controller environments. Whether you need to write a pick-and-place routine with precise linear moves, configure tool center point data, set up digital I/O handshaking with a PLC, or build interrupt-driven error recovery logic, this reference gives you the correct syntax and parameter format without navigating the full ABB RAPID manual.
Key Features
- Motion instruction reference for MoveL (linear), MoveJ (joint), MoveC (circular), MoveAbsJ (absolute joint), and SearchL (sensor search) with speed and zone parameters
- Complete data type definitions including robtarget (position/quaternion/axis config), tooldata (TCP/mass/COG), wobjdata (work object coordinates), speeddata, and zonedata
- Control flow syntax for IF/ELSEIF/ELSE, FOR/TO/DO, WHILE/DO, TEST/CASE multi-branch, PROC procedures, and FUNC return functions
- I/O instruction examples for SetDO/WaitDI digital signals, SetAO analog output, TPWrite teach pendant messages, and WaitTime delays with InPos option
- RobotStudio workflow guides for TCP calibration, station creation, virtual controller setup, Smart Component configuration, and Pack & Go project export
- Advanced RAPID features including TRAP interrupt handlers with ISignalDI, ERROR handlers with ERRNO codes and TRYNEXT recovery, and Offs position offset function
- Syntax-highlighted RAPID code with custom grammar for keywords (MoveL, PROC), data types, functions, comments, and string literals
- Category filtering across RAPID Motion, Data Types, Control, I/O, RobotStudio, and Advanced sections for targeted lookup
Frequently Asked Questions
What is the difference between MoveL, MoveJ, and MoveC in RAPID?
MoveL moves the TCP along a straight line path and is used when the linear trajectory matters (welding seams, dispensing). MoveJ moves each joint along the optimal path without guaranteeing a linear TCP trajectory, making it faster for point-to-point repositioning. MoveC performs a circular arc move requiring a via-point and endpoint. All three take speed, zone, and tool parameters: MoveL p10, v500, z10, tool0.
How do I define a tool (TCP) in RAPID?
Use PERS tooldata to declare a tool with its TCP position, orientation (quaternion), mass, and center of gravity. Example: PERS tooldata myTool := [TRUE,[[0,0,100],[1,0,0,0]],[0.5,[0,0,50],[1,0,0,0],0,0,0]]. The TRUE flag means the robot holds the tool (vs. stationary tool). Calibrate the TCP in RobotStudio using the 4-point or reorientation method for accurate positioning.
What do the speeddata and zonedata parameters control?
speeddata defines TCP linear speed (mm/s), rotation speed (deg/s), linear external axis speed, and rotational external axis speed. For example, v500 means 500 mm/s TCP speed. zonedata controls the corner path zone size: z10 means a 10 mm zone where the robot blends between motions. Use "fine" for an exact stop at the position with zero zone tolerance.
How do I handle digital I/O handshaking with a PLC in RAPID?
Use SetDO to set digital output signals and WaitDI to wait for digital input signals. A typical handshake: SetDO do_PartReady, 1 to signal the PLC, then WaitDI di_PlcAck, 1 to wait for acknowledgment before proceeding. WaitTime can add timeouts. This pattern enables synchronized operation between the robot and external automation systems.
What is a TRAP routine in RAPID and when should I use it?
A TRAP is an interrupt service routine that executes asynchronously when a connected signal triggers. Declare an intnum variable, connect it with CONNECT int1 WITH myTrap, then arm it with ISignalDI di1, 1, int1 to trigger on a rising edge. The TRAP routine runs immediately when the signal fires, making it ideal for emergency stops, part detection during motion, or external event handling.
How does error handling work in RAPID?
Add an ERROR section at the end of a PROC. When a runtime error occurs, execution jumps to the ERROR handler where you can check ERRNO for the specific error code (e.g., ERR_ROBLIMIT for joint limit violation). Use TRYNEXT to skip the failed instruction and continue, or RETRY to attempt the instruction again. This is essential for robust production programs that must recover from transient faults.
What is RobotStudio and how does this reference help with it?
RobotStudio is ABB's offline programming and simulation environment. This reference covers key workflows including creating stations with robot models from the ABB library, setting up virtual controllers with specific RobotWare versions, calibrating TCPs, building Smart Components for sensors and conveyors, and using Pack & Go to export complete projects as .rspag files for sharing or backup.
How do I use the Offs function for relative positioning?
Offs(position, x, y, z) returns a new robtarget offset from the given position by the specified X, Y, Z distances in the work object coordinate system. Example: MoveL Offs(p10, 0, 0, 50), v500, z10, tool0 moves to a point 50 mm above p10 in Z. This is invaluable for palletizing patterns, approach/retract moves, and generating grid positions from a single taught point.