KUKA Robot codes
KUKA RobotSystemBasic

KRC0709

KUKA Robot KRC0709 - “DEF”/“DEFFCT” NOT ALLOWED 2045

“DEF”/“DEFFCT” NOT ALLOWED 2045

This alarm indicates that a DEF or DEFFCT (function definition) declaration was used in a context where it is not permitted in KRL program <object name>. The KRC compiler has detected an invalid function definition syntax or placement that violates KRL language rules.

Common Causes

  • DEF or DEFFCT keyword used outside of the main program structure or in an invalid scope
  • Nested function definitions attempted where they are not supported
  • DEF/DEFFCT declaration placed within another function or conditional block
  • Incorrect function definition syntax or missing required function parameters
  • Function definition in a library or include file where local definitions are not permitted

Troubleshooting Steps

  1. 1Review the KRL program <object name> and locate the DEF or DEFFCT statement that triggered the alarm
  2. 2Verify that all function definitions are declared at the program level, not nested within other functions or control structures
  3. 3Check that function syntax is correct: DEF <function_name> (<parameters>) : <return_type> or DEFFCT <type> <function_name>
  4. 4Ensure function definitions appear before any MAIN program block or executable statements
  5. 5Consult the KRL language reference documentation for proper function definition placement and scope rules
  6. 6Recompile the program after corrections and verify the syntax is valid in the KRC development environment

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.