You probably have an exception somewhere in your code, related to a index overflow or a division by 0…
You might want to use POU for Implicit Checks.
In your CODESYS program, right click on your Application / Add Object / POU for Implicit Checks…
Check all the available functions.
After uploading your program on the PLC, and before starting it, go in each function and put a breakpoint (F9) in the error statement of the function (IF divisor = 0 … IF value < lower, IF value > higher…)
Start you program. It should end to a breakpoint. Then you can Step over breakpoint (F10) in order to see in which part of the program there is an issue.


