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

E0015: an assignment to what cannot be assigned

The left of :=, the target of =>, an in-out argument and a FOR loop’s variable must be variables that the POU may write: not a CONSTANT, not a literal or a call, not a function block’s output from outside the block, not an input address.

VAR CONSTANT LIMIT : INT := 10; END_VAR
VAR t : TON; END_VAR
LIMIT := 5;        (* E0015: a CONSTANT *)
t.Q := TRUE;       (* E0015: only TON writes its Q *)