Rules / visu-two-labels
One variable shown on screen under two different captions
A visualisation element was copied, the caption was edited and the binding was not: "Pump 1" and "Pump 2" show the same variable. Captions are compared by meaning and output formats are ignored. The check reads Cyrillic captions, as used on Russian-language panels.
Severity: Warning
Rule id: visu-two-labels
One variable under two captions
This rule only runs on CODESYS .export files: PLCopenXML does not contain these settings.
What the rule checks
The same variable is displayed on a screen next to different captions. This is almost always a copied element: "Pump 1" was drawn, duplicated next to it, the caption was fixed and the binding was not. The operator sees two instruments that in fact show one, and on site this surfaces exactly when a decision is made from the reading. Captions are compared by meaning: output formats (%d, %.1f) are stripped and extra whitespace is not treated as a difference.
What it does to the plant
The operator sees two gauges that show one value, and finds out when a decision is made from them.
Example
VAR_GLOBAL rPumpTemp1, rPumpTemp2 : REAL;END_VARVISU Overview GVL.rPumpTemp1 | Насос 1 %.1f GVL.rPumpTemp1 | Насос 2 %.1f
VAR_GLOBAL rPumpTemp1, rPumpTemp2 : REAL;END_VARVISU Overview GVL.rPumpTemp1 | Насос 1 %.1f GVL.rPumpTemp2 | Насос 2 %.1f
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
- Check the binding against the caption on both elements: the copied one usually kept its neighbour's variable.
- For identical instruments a single visualisation template with a variable parameter is easier: there is nothing to copy and no binding to drift.
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