KUKA Robot codes
KUKA RobotSystemBasic

KRC0806

KUKA Robot KRC0806 - INDEXING OR [] NOT ALLOWED 2142

INDEXING OR [] NOT ALLOWED 2142

This alarm indicates that an indexing operation or array/bracket notation has been used on an object that does not support this operation in the KRL program. The compiler has detected an attempt to access an element or index a variable that is not defined as an array or indexable type.

Common Causes

  • Attempting to index a scalar variable that is not an array
  • Using bracket notation on a function or procedure name instead of a variable
  • Indexing a structure member that is not declared as an array
  • Attempting to index a non-array parameter passed to a function
  • Syntax error with mismatched or improper bracket usage in array access

Troubleshooting Steps

  1. 1Review the line number indicated in the error message and identify the indexing operation that caused the alarm
  2. 2Verify that the object being indexed is declared as an array type in the variable declaration section
  3. 3Check the array declaration syntax and ensure it includes proper dimension specifications (e.g., REAL myArray[10])
  4. 4Confirm that the correct variable name is being used and that you are not accidentally trying to index a scalar or non-array object
  5. 5Review function/procedure parameter definitions to ensure array parameters are properly declared with array syntax
  6. 6Correct the KRL source code by either removing the indexing operation or declaring the variable as an appropriate array type, then recompile the program

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.