Message: Number <number of array values> of array initialisations is no constant value
Possible error cause: The initialization [Wert1,AnzahlWert2(Wert2)]
works only with a constant for AnzahlWert2
.
Error correction: Use constants only.
Example of the error:
PROGRAM PLC_PRG VAR i : INT := 3; arr1 : ARRAY[1..4] OF INT := [1,i(7)]; END_VAR --> C0162: Number 'i' of array initialisations is no constant value
Error correction:
Example: arr1 : ARRAY[1..4] OF INT := [1,3(7)];