Array index out of range
This happens when a variable used as array address index has a value outside the min/max range possible for this index. A similar circumstance determines the reading or writing of an incorrect variable, which is presumably allocated to addresses after those of the array in question. The consequences are unforeseeable and this error is very hard to identify.In this case too, the condition of array index out of range is intercepted by specific implementation of the array address operations via variable.If the value of the index variable is incorrect, the running of code 1131 is stopped before the operation is performed.GF Project VX Code reports the block in the PLC status window, as shown below.
To trace the running line responsible for the error it is necessary to be connected via telnet to the target: when the error occurs, a message is shown, indicating the details of the 1131 code line involved (“source” indicating the name of the POU hosting the code and “line” indicating the source line number).
It is possible to immediately reset the running, if the causes that determined the error no longer exist, with the PLC Start command.