KUKA Robot codes
KUKA RobotSystemBasic

KRC0685

KUKA Robot KRC0685 - EXTERNAL FUNCTION EXPECTED, SUBROUTINE FOUND 2021

EXTERNAL FUNCTION EXPECTED, SUBROUTINE FOUND 2021

This alarm occurs when the KRL compiler encounters a subroutine (DEFFCT or DEF) where an external function declaration (DEFFCT EXTERNAL) is expected. The compiler has detected a mismatch between the function type declared in the calling code and the actual function definition found in the program.

Common Causes

  • Function declared as EXTERNAL in one module but defined as a regular subroutine in another module
  • Missing EXTERNAL keyword in the function declaration when it should be accessible from other programs
  • Incorrect function signature or parameter mismatch between the declaration and implementation
  • Function implementation file not properly included or linked in the project structure
  • Mixing of function definition types (DEFFCT vs DEF) within related program modules

Troubleshooting Steps

  1. 1Verify the function is declared with DEFFCT EXTERNAL in the header file or calling module
  2. 2Check that the function implementation uses DEFFCT EXTERNAL with matching parameters and return type
  3. 3Review all function declarations across modules to ensure consistency with EXTERNAL keyword usage
  4. 4Confirm the function definition file is properly included in the project and accessible to calling programs
  5. 5Recompile the entire project after correcting function declarations to ensure all references are updated
  6. 6If the function should be internal only, remove EXTERNAL keyword from the calling reference or change the called function definition 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.