E0024: a VAR_CONFIG entry that does not fit the variable it names
A VAR_CONFIG entry names a variable inside a program instance and gives
it an address, an initial value, or both (Ed.3 6.8.2):
- the path names a variable, not just a program instance;
- an address goes only to a variable declared
AT %I*,%Q*or%M*, is in the same area (%Q*gets a%Qaddress), and is complete; - an initial value does not go to a
VAR_TEMP,VAR_EXTERNAL,VAR_IN_OUTorCONSTANTvariable.
The entry repeats the variable’s type; a different type is E0013.
VAR_CONFIG
cpu.main.pump.coil AT %IX0.0 : BOOL; (* E0024: coil is AT %Q* *)
cpu.main.count AT %MW4 : INT; (* E0024: count has no '*' address *)
cpu.main.count : INT := 100; (* fine: an initial value *)
END_VAR