KUKA Robot codes
KUKA RobotSystemBasic

KRC0788

KUKA Robot KRC0788 - NAME NOT DECLARED AS FUNCTION 2124

NAME NOT DECLARED AS FUNCTION 2124

A KRL program object named @P1@ is being called as a function, but it has not been declared as a function in the program. This typically occurs when attempting to invoke a subroutine, method, or callable element that either does not exist or was declared as a different type of object such as a variable or module.

Common Causes

  • Attempting to call an object that was declared as a variable instead of a function
  • Misspelled function name or incorrect reference to the function object
  • Function object not imported or included in the current program scope
  • Function declared in a different module without proper external declaration or interface
  • Using parentheses to call a non-callable object or missing function definition

Troubleshooting Steps

  1. 1Verify that @P1@ is declared as a FUNCTION in the KRL program using proper syntax: DEF function_name()
  2. 2Check the spelling and capitalization of the function name in both the declaration and the call statement
  3. 3Confirm that the function is defined before it is called, or ensure it is properly imported from another module if external
  4. 4Review the object declaration to ensure it was not mistakenly declared as a variable or other data type
  5. 5If the function is in a separate file or module, verify it is included via the appropriate INCLUDE or CALL statement
  6. 6Consult the program source files to locate the correct function definition and update the calling statement accordingly

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.