free quality report for PLCopenXML exports

Rules / signal-without-source

An alarm signal is read but nothing ever writes it

A boolean alarm or fault is used in conditions, but no line of code, no module channel and no HMI element writes it. So it stays FALSE forever.

Severity: Warning Rule id: signal-without-source Nothing ever raises this alarm

What the rule checks

A boolean state signal (alarm, error, fault) is read in the program's conditions, but no line of code and no module channel ever writes it. It therefore stays at zero forever: the alarm interlock never trips, the lamp on the screen never lights, the log keeps a dead entry. On site this looks like a healthy protection precisely because it never fires. The usual cause: the signal was expected from outside: the wiring was to be delivered by someone else, or the fieldbus polling was never finished, while the condition is already in the code. The rule deliberately looks only at alarm-style names and only at booleans: commands and setpoints are legitimately written from the visualisation, and sensor values come straight from a channel, and a PLCopenXML export shows neither. Anything bound to a channel in the device tree or mentioned in a graphical body is left alone.

What it does to the plant

The interlock never trips and the lamp on the mimic never lights; on site it looks like a healthy protection.

Example

Bad: the rule fires
VAR_GLOBAL    alarm_pressure : BOOL;    xRunPump : BOOL;    xCmdPump : BOOL;END_VARPROGRAM PumpCtrlgvl.xRunPump := gvl.xCmdPump AND NOT gvl.alarm_pressure;
Fixed: the rule is silent
VAR_GLOBAL    alarm_pressure : BOOL;    xRunPump : BOOL;    xCmdPump : BOOL;    rPressure : REAL;END_VARPROGRAM PumpCtrlgvl.alarm_pressure := gvl.rPressure < 0.5;gvl.xRunPump := gvl.xCmdPump AND NOT gvl.alarm_pressure;

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. Check where the signal is supposed to come from: if it is field wiring or fieldbus polling, bind the variable to its channel and the rule goes quiet.
  2. If there will be no source, drop the condition together with the variable: a dead interlock is more dangerous than a missing one, because people rely on it.
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