Back to the 2026 paper

Module 4: Robot Languages-RAPID & AML

20267m

Explain the basic structure of RAPID programming.

Worked SolutionAI Assisted

Basic Structure of RAPID Programming

RAPID is the high-level programming language of ABB industrial robots. It is a structured language with data types, routines, motion instructions and error handling.

Program hierarchy

MermaidDiagram
Rendering diagram…
Element Meaning
Module Container of data and routines (MODULE ... ENDMODULE)
PROC Routine that performs actions
FUNC Routine that returns a value
TRAP Interrupt handling routine
Data num, bool, string, robtarget, speeddata, zonedata, tooldata

Main motion instructions

  • MoveJ joint move, MoveL linear move, MoveC circular move.
  • Gripper/IO: SetDO, WaitDI, Set, Reset.
  • Control: IF, FOR, WHILE, TEST, ProcCall, WaitTime.

Example

MODULE Main
  CONST robtarget pPick := [[500,0,300],[0,0,1,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
  PROC main()
    MoveJ pPick, v1000, z50, tool0;
    MoveL Offs(pPick,0,0,-100), v200, fine, tool0;
    SetDO doGrip, 1;
    MoveL pPick, v200, fine, tool0;
  ENDPROC
ENDMODULE

Exam tip

Explain module, PROC main, motion instruction format MoveL target, speed, zone, tool and give the short example.

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.