KUKA · KRL

KUKA KRC4 template

PICK_PLACE.src + PICK_PLACE.dat
  • Interrupt-based search on $IN[1] — BRAKE on contact, exact position captured
  • Every instruction explained in plain-English comments
  • Teach four positions on the SmartPAD — the search finds the pick
  • Tested on a real KUKA robot (KRC4 / KSS 8.x)
Copy both files to KRC:\R1\Program\
ABB · RAPID

ABB RobotStudio demo

PATH2_ABB_SEARCH_DEMO.mod
  • Runs in RobotStudio with no I/O setup — simulated search and gripper
  • Comments show exactly which real signals to create and where
  • Easy settings block — search depth, lift distance, place offset
  • Validated in RobotStudio (RobotWare 6.x)
Load into RobotStudio and run — works out of the box

How the search routine works

Fixed pick heights break the moment your stack height varies — different part counts, compressed packaging, mixed batches. A search routine removes the problem: the robot moves down slowly from the approach position while watching a sensor input, and stops the instant the part is detected.

01 — ARM

Interrupt watches the sensor

On KUKA, INTERRUPT DECL 1 WHEN $IN[1]==TRUE arms a background watch on the gripper sensor. On ABB, SearchL does the same job natively.

02 — SEARCH

Slow move down

The robot moves down from the taught approach position. The moment the input goes TRUE, the interrupt fires — BRAKE stops motion immediately.

03 — CAPTURE

Found position saved

The contact position is stored and used as the real pick point. The gripper closes, the robot lifts clear, places, and repeats.

Setup before you run

KUKA — teach on the SmartPAD

XP_HOMERobot home / safe position
XP_PICK_APPApproach above the pick — search starts here
XP_PLACE_APPApproach above the place position
XP_PLACEFinal place position
$OUT[1]Gripper close / vacuum on
$IN[1]Contact sensor / vacuum feedback — triggers the search interrupt

No pick position to teach — the search finds it. Configure $TOOL, $BASE and your port numbers, then test at 5% override first.

ABB — teach on the FlexPendant

pSearchTopTop of search — teach the position the robot searches down from, above the part (the demo just uses its current position after jHome)
pPlacePlace position — the demo calculates it as an offset from the pick; on a real robot, teach your actual place position
diPartFoundDigital input to create — part detection sensor (vacuum switch, photoeye, proximity)
doGripDigital output to create — gripper close / vacuum on

The file runs in RobotStudio as-is with no I/O setup — the search and gripper are simulated. The comments walk you through the real-robot version step by step: teaching the positions, creating diPartFound and doGrip (Controller → Configuration → I/O System → Signal), and the exact SearchL and SetDO lines that replace the simulated moves.

Need a full palletizing program?

The Path2 generator builds complete KUKA KRL and ABB RAPID palletizing programs from your pallet pattern and box sizes — including gripper signals, separator sheets and depalletizing. Validated in RobotStudio and tested on a real KUKA robot.

Open the palletizing generator →