Handle watchdog timeout

2021-12-01
2021-12-03
  • kristiankroier - 2021-12-01

    What is the preferred way to handle a watchdog timeout on a SoftPLC? According to the documentation the timed out task will be suspended and that is fine but is there some way to determine this from the code to handle the event by e.g. raising an alarm or restarting the SoftPLC?

     
  • i-campbell

    i-campbell - 2021-12-01

    You can add an exception handler by double clicking the Task Configuration, see attached.

     
    πŸ‘
    1
  • kristiankroier - 2021-12-02

    Thank you. That helped me move forward.

     
  • kristiankroier - 2021-12-03

    So now the exception handler is working I can set a global variable. But when the exception is called my visualization is made unavailable. I can see the tasks not halted by the watchdog keeps increasing the cycle count but the IEC-cycle count stops increasing.
    Shouldn't the watchdog only halt the task causing problems and letting the rest of the system continue working?

    I tried creating a sub-application to my main application and move the visualization there. This results in the sub-application being stopped when the exception occurs as well but this can be restarted which is adequate for testing but not really for production.
    Any suggestions?

     

Log in to post a comment.