If my application does some kind of violation which makes it cast an exception it will trigger my real watchdog which results in a reboot.
Unfortunately the log it seems only shows the boot sequence. Is it possible to see what happen before reboot?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In general Codesys is used to control equipment and an exception is the worst thing that can happen in your installation.
If you cannot prevent the exception from triggering, you could implement a Try catch statement, with this solution your controller keeps on running and you are able to handle the exception.
If my application does some kind of violation which makes it cast an exception it will trigger my real watchdog which results in a reboot.
Unfortunately the log it seems only shows the boot sequence. Is it possible to see what happen before reboot?
Hi DavidBo,
In general Codesys is used to control equipment and an exception is the worst thing that can happen in your installation.
If you cannot prevent the exception from triggering, you could implement a Try catch statement, with this solution your controller keeps on running and you are able to handle the exception.
What you also could do is implement implicit checks, these functions cover most of the exceptions (like dividing by zero)
See picture
But in general avoid a complete controller shutdown!
Last edit: alexgooi 2024-02-09