KUKA Robot codes
KUKA RobotSystemBasic

KRC0820

KUKA Robot KRC0820 - NAME NOT DECLARED AS LABEL 2156

NAME NOT DECLARED AS LABEL 2156

This alarm indicates that a label or identifier referenced in the KRL program has not been properly declared before use. The compiler encountered a reference to @P1@ that does not correspond to any defined label, function, or variable declaration in the current scope or accessible modules.

Common Causes

  • Label or identifier @P1@ is referenced but never declared using DEF, DECL, or LABEL statements
  • Typo or spelling mismatch between the label declaration and its reference
  • Label declared in a different scope or module that is not accessible to the current program
  • Missing or incorrect module import/include statement needed to access the label
  • Label was deleted or commented out but references to it remain in the code

Troubleshooting Steps

  1. 1Review the error message and identify the exact label name @P1@ that is not declared
  2. 2Search the entire KRL program and all included modules for the declaration of @P1@
  3. 3Verify the spelling and capitalization of @P1@ in both the declaration and all reference locations match exactly
  4. 4Confirm that any required module containing @P1@ is properly included using INCLUDE or IMPORT statements
  5. 5Check the scope visibility - ensure @P1@ is declared at global level or in an accessible function/module
  6. 6Declare the missing label using appropriate KRL syntax (DEF for functions, DECL for variables, or LABEL for jump targets) if intentionally omitted

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.