Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

E0025: a VAR_CONFIG outside a CONFIGURATION

The standard puts VAR_CONFIG inside the CONFIGURATION, after its resources (Ed.3 6.8.2, Annex A Config_Decl), and its paths start with the resource and the program instance.

CODESYS writes it instead in a list of its own, at the top of a file, with paths starting at the PROGRAM’s name. iecf reads that form only with --extension var-config-list (docs/extensions.md), and only in a project without a CONFIGURATION: with one, VAR_CONFIG goes inside it.

VAR_CONFIG                                   (* E0025 without the extension *)
  PLC_PRG.valve1.coil AT %QX0.0 : BOOL;
END_VAR

The fix, by the standard:

CONFIGURATION plant
  RESOURCE cpu ON PLC
    TASK main_task (INTERVAL := T#10ms, PRIORITY := 1);
    PROGRAM PLC_PRG WITH main_task : PLC_PRG;
  END_RESOURCE
  VAR_CONFIG
    cpu.PLC_PRG.valve1.coil AT %QX0.0 : BOOL;
  END_VAR
END_CONFIGURATION