Rules / heating-dhw-fault-opens
DHW: the heating valve opens when the sensor fails
In the sensor-fault or not-AUTO branch the program must drive the valve to a safe position. For space heating "open" is usually right, for domestic hot water it is not: an open valve means full heat with no control. The rule belongs to the heating profile.
Severity: Warning
Rule id: heating-dhw-fault-opens
DHW: valve opens on a sensor fault
This rule belongs to the optional "heating" profile and only runs when the profile is enabled.
What the rule checks
In the sensor-fault branch (or "not AUTO") the program should drive the actuator to a safe position, and which position is safe depends on the circuit. For space heating, fully open is usually right: the building does not freeze. For domestic hot water, an open heating-side valve means maximum heat into the exchanger with no control: overheated water at the tap and a scalding risk. The rule only looks at DHW circuits, and only by explicit markers: DHW/GVS in the POU or output name. In the branch that runs on a sensor fault (IF NOT alarm … ELSE or IF alarm THEN) it looks for an "open" output set to TRUE. Without explicit circuit markers it stays silent. Which position is safe is the process engineer's call: the finding is a question, not a verdict.
What it does to the plant
Overheated water at the tap and a scalding risk when the DHW temperature sensor breaks.
Example
VAR_GLOBAL xFaultDhw, xAutoDhw : BOOL; rDhwTemp, rDhwSet : REAL; dhw_valve_open, dhw_valve_close : BOOL;END_VARPROGRAM DhwValveIF NOT gvl.xFaultDhw AND gvl.xAutoDhw THEN gvl.dhw_valve_open := gvl.rDhwTemp < gvl.rDhwSet - 2.0; gvl.dhw_valve_close := gvl.rDhwTemp > gvl.rDhwSet + 2.0;ELSE gvl.dhw_valve_open := TRUE; gvl.dhw_valve_close := FALSE;END_IF
VAR_GLOBAL xFaultDhw, xAutoDhw : BOOL; rDhwTemp, rDhwSet : REAL; dhw_valve_open, dhw_valve_close : BOOL;END_VARPROGRAM DhwValveIF NOT gvl.xFaultDhw AND gvl.xAutoDhw THEN gvl.dhw_valve_open := gvl.rDhwTemp < gvl.rDhwSet - 2.0; gvl.dhw_valve_close := gvl.rDhwTemp > gvl.rDhwSet + 2.0;ELSE gvl.dhw_valve_open := FALSE; gvl.dhw_valve_close := TRUE;END_IF
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
- Agree the safe position of the DHW valve on a sensor fault with the process engineer; it is usually closed or a fixed position, not open.
- If opening is deliberate (for instance, there is independent overheat protection), say so in a comment inside the fault branch.
Upload a PLCopen XML or CODESYS .export file: the report is free and the code is not stored.
The same linter without uploading a file: command line and GitHub Action.
Related rules
2026-11-26