KUKA Robot codes
KUKA RobotSystemBasic

KRC0787

KUKA Robot KRC0787 - NAME NOT DECLARED AS ARRAY 2123

NAME NOT DECLARED AS ARRAY 2123

This alarm occurs when a KRL program attempts to use or reference an object as an array when it has not been declared as an array type. The compiler detects a mismatch between how the variable is being used and how it was declared in the program.

Common Causes

  • Variable declared as a scalar but accessed with array index notation (e.g., MyVar[0])
  • Function or module parameter expected to be an array but a scalar value was passed
  • Incorrect declaration syntax missing array dimensions or brackets
  • Attempting to use array operations on a non-array data type
  • Copy-paste error where array syntax was applied to a scalar variable name

Troubleshooting Steps

  1. 1Locate the line number referenced in the alarm message and review the variable declaration
  2. 2Verify the variable is declared with proper array syntax (e.g., REAL MyArray[10] instead of REAL MyVar)
  3. 3Check all usages of the variable to ensure they match the declared type (array vs scalar)
  4. 4Review function/module calls to confirm array parameters are being passed as arrays, not scalars
  5. 5Correct the variable declaration to include appropriate array dimensions if array functionality is required
  6. 6Recompile the KRL program and verify 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.