Learn KUKA-KRL with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Move to a Position
PTP {X 500, Y 0, Z 400, A 0, B 0, C 0} C_PTP ;
Move the robot to a specific position using joint coordinates.
2
Open and Close Gripper
SET_DO Gripper, TRUE
WAIT SEC 1
SET_DO Gripper, FALSE
Control a digital output to open and close the robot gripper.
3
Linear Movement
LIN {X 500, Y 100, Z 300, A 0, B 0, C 0} C_DIS ;
Move the robot linearly to a target position.