free quality report for PLCopenXML exports

Rules / watchdog-disabled

CODESYS task watchdog disabled: why it is dangerous

The cyclic task has Watchdog unchecked. If the scan hangs or overruns, the controller will not restart the task or reach a safe state on its own. The main control task always needs a watchdog.

Severity: Warning Rule id: watchdog-disabled Task watchdog disabled

This rule only runs on PLCopenXML: .export stores task and address configuration differently.

What the rule checks

A cyclic task has its watchdog disabled. If the scan overruns or hangs (e.g. a long cycle), the controller won't restart the task automatically. This matters most for the main control task.

What it does to the plant

When the scan hangs, outputs stay in their last state indefinitely: a pump runs dry, a valve stays open.

Example

Bad: the rule fires
<task name="MainTask" interval="PT0.01S" priority="1">  <addData>    <data name="http://www.3s-software.com/plcopenxml/taskwatchdog">      <Watchdog Enabled="false" Time="t#100ms" Sensitivity="1"/>    </data>  </addData>  <pouInstance name="PLC_PRG" typeName=""/></task>
Fixed: the rule is silent
<task name="MainTask" interval="PT0.01S" priority="1">  <addData>    <data name="http://www.3s-software.com/plcopenxml/taskwatchdog">      <Watchdog Enabled="true" Time="t#100ms" Sensitivity="1"/>    </data>  </addData>  <pouInstance name="PLC_PRG" typeName=""/></task>

Both listings are run through the linter by an automated test: the rule fires on the first and stays silent on the second.

How to fix

  1. Enable the task watchdog: in the task configuration tick Watchdog and set the time (usually a multiple of the cycle, e.g. 100 ms for a 10 ms cycle).
  2. At least for the main control task; visualization and cloud tasks can go without one.
Check your project

Upload a PLCopen XML or CODESYS .export file: the report is free and the code is not stored.

Local version on GitHub →

The same linter without uploading a file: command line and GitHub Action.

Related rules

In-depth article

2026-11-26

Processing happens in memory, and the uploaded code is not stored. The tool advises; code changes are up to the engineer (see what the linter can't see). What happens to your code → · Rule reference · Your code & privacy · Industry benchmark · Feedback · GitHub