KUKA Robot codes
KUKA RobotSystemBasic

KRC0815

KUKA Robot KRC0815 - “SWITCH” CONTAINS NO “CASE” 2151

“SWITCH” CONTAINS NO “CASE” 2151

This alarm indicates a syntax error in KRL program code where a SWITCH statement has been declared without any corresponding CASE clause. The SWITCH control structure requires at least one CASE statement to be valid. This is a compile-time error that prevents the program from executing.

Common Causes

  • SWITCH statement defined with no CASE clauses following it
  • All CASE clauses were accidentally deleted or commented out
  • Incorrect indentation or syntax placement causing CASE statements to not be recognized as part of the SWITCH block
  • Missing END statement or improper block termination before CASE clause definition
  • Copy-paste error resulting in incomplete SWITCH-CASE structure

Troubleshooting Steps

  1. 1Open the KRL source file in the KUKA IDE and locate the line number referenced in the alarm message
  2. 2Verify that the SWITCH statement has at least one CASE clause defined within its block
  3. 3Check for proper syntax: ensure each CASE is followed by a value and colon (CASE value:)
  4. 4Review indentation and confirm all CASE statements are at the correct scope level within the SWITCH block
  5. 5Add missing CASE clauses or uncomment deleted CASE statements as required by your program logic
  6. 6Compile the program again to verify the syntax error 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.