Learn FANUC-TP-KAREL with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Move to a Position (TP)
J P[1] 100% FINE ;
Move the robot to a specific position using joint coordinates with TP.
2
Open and Close Gripper (TP)
DO[1]=ON ;
WAIT .5 ;
DO[1]=OFF ;
Control a digital output to open and close the robot gripper using TP.
3
Conditional Move (KAREL)
PROGRAM ConditionalMove
VAR in_signal : BOOLEAN
in_signal = get_digital_input(1)
IF in_signal THEN
MOVEJ P1
ELSE
MOVEJ P2
ENDIF
END ConditionalMove
Use KAREL to conditionally move the robot based on a sensor input.