Hello everyone,
I’m currently facing an issue in PLCnext Engineer where I encounter an " Index value exceeds the bounds of the array dimension" error when attempting to access the first index [0] of an array named SENSOR_DATA. This index is crucial as it holds the temperature data from a holding register. I also access indices for EC [2] and TDS [4], where there are no issues.
ArrayDimensions.png
Here’s the situation:
I am able to access indexes 1 to 125ModbusFB.pngDataTypes.png
* without any issues.
* Any attempt to access index 0 or any index above 125 results in the aforementioned error.
* This error occurs even though index 0 should theoretically be valid and is essential for processing the temperature data.
I’ve attached screenshots showing my list of variables, the applied function blocks, and the specific snippet of Structured Text where the error is reported. I am puzzled because accessing the first element of an array should be straightforward. Although this is my first time working with Modbus protocols, the error doesn’t seem to be directly caused by the Modbus configuration; nonetheless, I’m unsure why it’s considered out of bounds.
Could anyone shed some light on what might be causing this issue or how to resolve it? Any suggestions or insights would be greatly appreciated!
Thanks in advance for your help!
