The constant index ‘<index value>’ is not within the range from ‘<start index>’ to ‘<end index>’
An index is specified that is outside the size of the array.
Only use indexes that are within the size of the array.
PROGRAM PLC_PRG
VAR
arr1 : ARRAY[1..2] OF INT;
END_VAR
arr1[3] := 1;
--> C0049: The constant index '3' is not within the range from '1' to '2'
arr1[2] := 1;