KUKA Robot codes
KUKA RobotSystemBasic

KRC0698

KUKA Robot KRC0698 - END OF BLOCK OR COMMENT EXPECTED 2034

END OF BLOCK OR COMMENT EXPECTED 2034

This syntax error occurs when the KRL compiler encounters invalid syntax where it expected either the end of a program block (DEF/ENDDEF, IF/ENDIF, LOOP/ENDLOOP, etc.) or a comment marker (semicolon). The compiler cannot parse the current line due to missing or malformed block terminators or comment declarations.

Common Causes

  • Missing or misplaced semicolon (;) at the end of a statement or comment
  • Unclosed control structure (IF/ENDIF, FOR/ENDFOR, LOOP/ENDLOOP, etc.)
  • Incorrect syntax in function/module declaration without proper DEF/ENDDEF pairing
  • Invalid character or operator where a block terminator was expected
  • Mixing incompatible statement syntax or missing required keywords before block end

Troubleshooting Steps

  1. 1Open the KRL source file in the KUKA IDE and navigate to the line number specified in the error message
  2. 2Verify all control structures (IF/ENDIF, FOR/ENDFOR, LOOP/ENDLOOP, SWITCH/ENDSWITCH) are properly paired and closed
  3. 3Check that all statements are properly terminated with semicolons and comments are correctly prefixed with semicolons
  4. 4Review the syntax of function/module declarations to ensure DEF and ENDDEF statements are correctly matched
  5. 5Compare the problematic code section against KUKA KRL syntax documentation and similar working code blocks
  6. 6Correct the syntax error, save the file, and recompile the program to 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.