free quality report for PLCopenXML exports

Rules / dead-pou

A POU nobody calls: dead code in a CODESYS project

A program or function block exists in the project but nothing calls it or uses it as a type. It is either a forgotten old version or a typo in a call name, so a different block runs instead.

Severity: Minor Rule id: dead-pou Dead code: a POU nobody calls

What the rule checks

The POU is never called and never used as a type: dead code, or a forgotten name change (check against the spec before deleting).

What it does to the plant

A fix goes into the dead copy and is believed to be live, while the site keeps running the old logic.

Example

Bad: the rule fires
PROGRAM PLC_PRGPumps();PROGRAM PumpsVAR    xRun : BOOL;END_VARxRun := TRUE;PROGRAM PumpsOldVAR    xRun : BOOL;END_VARxRun := FALSE;
Fixed: the rule is silent
PROGRAM PLC_PRGPumps();PROGRAM PumpsVAR    xRun : BOOL;END_VARxRun := TRUE;

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. If it is not needed, delete the POU.
  2. A forgotten version: check the call name against the spec, possibly a typo in the name.
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

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