KUKA Robot codes
KUKA RobotSystemBasic

KRC0684

KUKA Robot KRC0684 - EXPECTED EXT. SUBROUTINE, FOUND FUNCTION 2020

EXPECTED EXT. SUBROUTINE, FOUND FUNCTION 2020

This alarm occurs when the KRL compiler encounters a function declaration or call where an external subroutine (DEFFCT/DEFDAT) was expected during program compilation. The mismatch between expected subroutine type and actual function type prevents successful program loading or execution.

Common Causes

  • Incorrect use of DEFFCT (function) instead of DEFDAT (external subroutine) in source code
  • Calling an external subroutine that was declared as a DEFFCT function
  • Mixing subroutine and function syntax in the same program call
  • Incorrect parameter passing syntax between functions and external subroutines
  • Outdated or incompatible KRL source files after IDE or system updates

Troubleshooting Steps

  1. 1Review the KRL source code and identify the line causing the conflict between function and subroutine declarations
  2. 2Verify all external subroutine declarations use DEFDAT syntax instead of DEFFCT for subroutines
  3. 3Check the function/subroutine call syntax matches the declaration type (DEFFCT calls use parentheses, DEFDAT calls do not)
  4. 4Compare the source file against KUKA documentation to ensure correct KRL syntax for your controller version
  5. 5Recompile the affected KRL program after corrections and verify all references are consistent
  6. 6If using multiple program files, ensure all imported modules use matching subroutine/function declaration types

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.