1. Home
  2. /
  3. Fanuc-tp-karel
  4. /
  5. Conditional Move (KAREL)

Conditional Move (KAREL) - Fanuc-tp-karel Typing CST Test

Loading…

Conditional Move (KAREL) — Fanuc-tp-karel Code

Use KAREL to conditionally move the robot based on a sensor input.

PROGRAM ConditionalMove
VAR in_signal : BOOLEAN
in_signal = get_digital_input(1)
IF in_signal THEN
	MOVEJ P1
ELSE
	MOVEJ P2
ENDIF
END ConditionalMove

Fanuc-tp-karel Language Guide

Fanuc TP (Teach Pendant) and Karel are programming environments for Fanuc industrial robots. TP programming uses a simple, menu-driven approach for robot motion and operations, while Karel is a high-level language for complex logic and automation.

Primary Use Cases

  • ▸Robot motion programming via teach pendant
  • ▸Automation of manufacturing processes
  • ▸Complex logic implementation using Karel
  • ▸Integration with I/O devices and sensors
  • ▸Simulation and verification of robot programs

Notable Features

  • ▸Menu-driven TP programming for quick robot setup
  • ▸High-level Karel language for advanced logic
  • ▸Support for conditional statements, loops, and subroutines
  • ▸Integrated debugging and error handling
  • ▸Compatibility across Fanuc robot models

Origin & Creator

Fanuc developed TP and Karel in the 1980s-1990s to standardize robot programming across its industrial robot line.

Industrial Note

TP and Karel are highly specialized for Fanuc robots in industrial automation, including assembly, welding, palletizing, and CNC support.

More Fanuc-tp-karel Typing Exercises

Move to a Position (TP)Open and Close Gripper (TP)

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher