KUKA Robot codes
KUKA RobotSystemBasic

KRC0785

KUKA Robot KRC0785 - OBJECT MUST BE DECLARED IN DATA LIST OR IMPLICITLY 2121

OBJECT MUST BE DECLARED IN DATA LIST OR IMPLICITLY 2121

This alarm indicates that a KRL program object (variable, module, or function) referenced in the code has not been properly declared in the data list or through implicit declaration. The compiler cannot locate the object definition, preventing successful program compilation or execution.

Common Causes

  • Object name is referenced but never declared with a data type in the DECL section
  • Typo or case sensitivity mismatch in the object name between declaration and usage
  • Missing GLOBAL or EXPORT keyword for objects that need broader scope visibility
  • Object is declared in a different module/file but not properly imported or linked
  • Incorrect syntax in the declaration statement or missing required parameters in function definitions

Troubleshooting Steps

  1. 1Verify the object name spelling and case sensitivity matches exactly between declaration and all usage locations
  2. 2Check that all referenced objects have explicit declarations in the DECL section with proper data types
  3. 3Confirm that GLOBAL or EXPORT keywords are used correctly if the object needs access from other modules
  4. 4Review module linkage and ensure all required source files are included in the project compilation list
  5. 5Consult the KRL program structure to verify implicit declaration rules are met if relying on automatic type inference
  6. 6Recompile the program after corrections to confirm the alarm is resolved

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.