ndzied1
Lifetime Supporting Member
CoDeSys Tasks (if the hardware supports it) allow you to define a watchdog time and sensitivity. The sensitivity is an integer that goes along with the time to determine when to throw a watchdog error.
If the sensitivity is 0 or 1, the error is thrown as soon as the task exceeds the watchdog setting.
If the sensitivity, n, it > 1 then the error is thrown after n consecutive task executions > the watchdog time OR a single execution that exceeds n times the watchdog time setting.
I think this is to allow for occasional running of code expected to take a little longer than the normal watchdog time. I don't think I'd do this with a task doing the I/O work but perhaps for a task that runs during setup or analysis it would be ok.
If the sensitivity is 0 or 1, the error is thrown as soon as the task exceeds the watchdog setting.
If the sensitivity, n, it > 1 then the error is thrown after n consecutive task executions > the watchdog time OR a single execution that exceeds n times the watchdog time setting.
I think this is to allow for occasional running of code expected to take a little longer than the normal watchdog time. I don't think I'd do this with a task doing the I/O work but perhaps for a task that runs during setup or analysis it would be ok.
Last edited: