KUKA Error 2021 — THE DATA LIST IS NOT OF TYPE 'PUBLIC'
Displayed as KSS02021 on KRC4 / KRC5 controllers
KUKA 2021 (“THE DATA LIST IS NOT OF TYPE 'PUBLIC'”): Global variables from DAT files can only be used in differently named SRC files if the DAT file has been declared as "PUBLIC". First check: Insert the keyword "PUBLIC" in the header of the DAT file.
Updated 2026-09-09 · LogrobotLM reference
Cause
Global variables from DAT files can only be used in differently named SRC files if the DAT file has been declared as "PUBLIC". Example: DEFDAT P1 DECL GLOBAL INT a = 1 ENDAT DEF P2() a = 2 END
Effect
The program is not executable.
Troubleshooting
Insert the keyword "PUBLIC" in the header of the DAT file. If necessary, the header must first be made visible via the menus "CONFIGURATION --> TOOLS --> EDITOR --> DEF line". Example: DEFDAT P1 PUBLIC DECL GLOBAL INT a = 1 ENDAT DEF P2() a = 2 END
Related codes
Indicative field information — the robot manufacturer's manual and safety procedures always prevail. Never bypass a safety device; apply lockout/tagout (LOTO) before any physical intervention. How this reference is built →