Hi, I just started investigate about how the PLCnext watchdog will handle custom program failure, by implementing a dummy infinite loop in my C++ program. The system did not try to restart my program. I observed these two lines in the log file: ERROR - Watchdog of task ‘Cyclic100’ triggered ERROR - Watchdog occured: stopping Plc asynchronously. Is this behavior can be changed ? In a more complex situation, when a program can crash for a rarely occurring cause, it might be useful to get it automatically restarted. Thanks
Dear fblanchard,
At first i would like to express that restarting a realtime system after a watchdog failure should be “handled with care” triggering a watchdog means automattically that the realtime promise is broken at that cycle
I would advice that pieces of programs which are sensitive to cause longer cycletimes should be put in seperate tasks with lower priorities and longer watchdog times
Is this possible in your program?Please also take into account that the AXCF2152 is a multicore system
this gives the user the opportunity to schedule tasks on seperate cores at the same timeBut if it is really necessary to implement automatic restarts after watchdogs:
Restarting the system after a watchdog is something you would typically find in a task of the type “system”
According to the roadmap System and Event tasks are on the requirements lists, but do not have an expected implementation date yet With kind regards,
Jan-Willem
Hi fblanchard, If you really need such functionality, you could ‘simply’ monitor the logfile using a shell script or a utility like ‘Monit’, However simply restarting your run-time on an exception does come with potentially a great deal of risk. Perhaps lateron there will be a more gracefull/official way of restarting/handling a stopped program. Cheers, Vincent
Hi fblanchard, at first I’ve to underline the statement from Jan-Willem, that such a function must be used very carefully. But as some kind of outlook will PLCnext support with the firmware version 2.0 (coming in November) system and event task.
A task watchdog will be a system event and you will be able to handle the event (like catch, execute a special routine, reboot…), similar to our “classic” PLCs. cu Frank
Thanks for all you answers! I just want to point out that my primary goal is not about rebooting the system, but just restarting our single C++ custom program in case of a logical failure (like unpredictable crash or dead lock). Rebooting the system is something that I would like to avoid as much as possible (last resort). It is not the first time that I had to use an hardware or software watchdog (call it Monitoring or Caretaker systems) and it is critical for us to ensure continuous servicing on remote location where there is no network infrastructure at all. The “system and event task” will be a great addition to the PLCnext. In the mean time I will probably use a solution like ‘Monit’, as suggested. Thanks.
