KUKA Robot codes
KUKA RobotSystemBasic

KRC0943

KUKA Robot KRC0943 - TYPE RETURN VALUE INCOMPATIBLE WITH TYPE FUNCTION 2280

TYPE RETURN VALUE INCOMPATIBLE WITH TYPE FUNCTION 2280

A function or subroutine in the KRL program is returning a value whose data type does not match the declared return type of the function. This type mismatch occurs during program compilation or execution when the return statement attempts to pass incompatible data to the caller. The error prevents program execution until the return value type is corrected to match the function signature.

Common Causes

  • Returning a variable of incorrect data type (e.g., INT instead of REAL)
  • Returning a value from wrong output parameter in function definition
  • Type conversion not performed before return statement
  • Function signature modified without updating corresponding return statements
  • Returning incompatible complex types (AXIS vs FRAME, BOOL vs INT, etc.)

Troubleshooting Steps

  1. 1Locate the function declaration and verify the declared return type in the function header
  2. 2Check all RETURN statements in the function and compare actual return value types to declared type
  3. 3Review the function call site to confirm expected return type matches function declaration
  4. 4Apply explicit type conversion using CAST() or appropriate conversion functions if needed
  5. 5Verify variable declarations match function signature, especially for array and structure types
  6. 6Recompile the KRL program and confirm alarm clears after type corrections are made

Seeing Multiple Alarms?

Seeing another alarm with this one? Enter the code.

Get machine-aware diagnosis

AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.

Start free

Was this guide helpful?

Always verify with your machine manual or a certified technician before performing service procedures.