Troubleshooting
Why a WinCC Professional LREAL field shows 0.0
Short answer
A WinCC Professional I/O field that shows 0.0 while the PLC data block holds a correct LREAL is losing the value between controller and screen, usually at the HMI tag. Read the LREAL in a watch table, monitor the tag next, and check the field assignment and format last. If direct display still fails, keep the LREAL for processing and derive a separate REAL display tag, such as watt-hours divided by 1000 shown as kilowatt-hours.
On this page
A WinCC Professional I/O field that shows 0.0 while the PLC data block holds a correct LREAL is losing the value between the controller and the screen, and the HMI tag — not the field's number format — is where it is usually lost. Work through three checkpoints in order: the watch table in the PLC, the tag in tag management, then the I/O field. The first checkpoint where the value turns to zero names the fault. If the tag is right and direct display still fails, keep the 64-bit LREAL for processing and derive a separate REAL display value — a watt-hour total divided by 1000 shown as kilowatt-hours is the typical case — and give that value its own tag.
Trace the value through three checkpoints #
An LREAL is a 64-bit floating-point number; according to Siemens' data type documentation for S7-1200 and S7-1500 controllers it is processed with a precision of 15 digits. A correct value in the data block proves nothing about what the HMI receives, so prove each hop before adjusting anything on the screen.
- Read the LREAL in a PLC watch table. Confirm it is a legal number that changes within the expected range, and record it with its engineering unit. Raw meter bytes read under the wrong type often decode to a value near zero, so an illegal or frozen value here is a PLC-side fault, not an HMI one.
- Monitor the tag the field uses. In tag management, check that the connection targets the right PLC, the address names the exact data-block member, and the tag data type matches the member. The monitored value must track the watch table.
- Inspect the I/O field last. Only now look at the tag assignment and the format pattern, because no format setting can rescue a tag that reads zero.
The first checkpoint where the value becomes zero is the fault location: a zero in the watch table means the PLC program or its source device; a correct watch table with a zeroed tag means the connection, the address or the tag data type; a correct tag with a zeroed field means the assignment or the display format. This is the driver-tag-screen split from diagnosing whether the fault is the driver, the tag or the screen, applied to one 64-bit number.
| Watch table | Monitored tag | Fault area | Fix first |
|---|---|---|---|
| Correct value | 0.0 | Connection, address or tag data type | Correct the tag definition, then re-monitor |
| Correct value | Correct value | Field assignment or format pattern | Reassign the tag, set the format |
| 0.0 or illegal number | Anything | PLC program or source device | Fix the calculation or the meter link |
Check the tag data type before blaming the format #
Siemens documents, in its note on the effects of rounding with 64-bit PLC data types in SIMATIC WinCC Basic, Advanced and Professional, that some 64-bit PLC data types are rounded when mapped to HMI data types in TIA Portal. Read that as a statement about the tag, not the field: if the tag editor for your target offers no 64-bit floating type, the tag carries the value rounded into the 32-bit floating type, and where the PLC holds 15 digits the tag side carries roughly seven. Digits beyond that disappear as rounding, which is documented behavior, not an acquisition fault.
A tag stuck at 0.0 while the watch table moves is different, and it has four causes to eliminate:
- The connection points at the PLC that actually holds the member. Two stations on one network with similar data-block names will silently read the wrong controller.
- The address names the exact data-block member holding the LREAL, checked against the block as compiled, not against a similarly named tag elsewhere in the project.
- The tag data type is the 64-bit floating type where it is offered, or an intentional narrower conversion — never an integer type, which reinterprets the same bytes as a different number entirely.
- The field and the online monitor reference the same tag, so you are validating the tag you actually display.
The decision: a correct watch table with a monitored tag stuck at 0.0 is a tag definition fault. Fix the tag and re-monitor; do not touch the I/O field yet.
Worked example: a 12,345,678.9 Wh total shown as kWh through a REAL tag #
This is the fallback when the tag is correct and direct LREAL display still fails, or when the 64-bit mapping in your WinCC version rounds more than the display needs. Keep the LREAL as the processing value and derive a display value beside it; the discipline of deriving a display-scale value with its own tag is the same one behind how to scale a PLC integer into an HMI display value, applied to a floating-point total.
Inputs:
- Internal LREAL total: 12,345,678.9 Wh, an example test value entered in the data block and confirmed in the watch table.
- Unit conversion: 1 kWh = 1000 Wh, the definition an operator expects on an energy display.
- LREAL precision: 15 digits, per the S7-1200/S7-1500 data type documentation.
- REAL precision: roughly 7 significant digits, with range out to magnitudes near 1 followed by 38 zeroes — range never limits a meter total, digits do.
- Display format: two decimal places on the kilowatt-hour field.
Rule in words: the display value in kilowatt-hours equals the internal watt-hour total divided by 1000, stored as a REAL in its own data-block member with its own tag assigned to the field. The internal LREAL is not replaced.
Arithmetic: 12,345,678.9 Wh ÷ 1000 = 12,345.6789 kWh. The REAL member carries that value rounded into single precision, approximately 12,345.68.
Result: the field with two decimal places shows 12,345.68 kWh against the true total, a display miss of about 0.001 kWh — rounding, not a fault.
Decision: display through the derived REAL tag whenever the operator needs no more than about seven significant digits, which covers any kilowatt-hour total a machine screen shows. Keep chasing a direct 64-bit tag only when a display must read more digits than that. And if the derived tag monitors correctly while the field still shows 0.0, the fault is in the field assignment or the format pattern, not in the conversion.
Set the field format last #
With the tag proven, a remaining 0.0 lives in the field. Check three things on the WinCC Professional I/O field:
- The tag assignment names the tag you monitored — and, where you derived a display value, the REAL tag rather than the internal LREAL tag.
- The format pattern provides enough decimal places for the magnitude: a pattern with no decimal places shows a value of 0.4 kWh as 0, and the field is doing exactly what it was told.
- The field mode matches the job — output for a pure display, input/output only where the operator writes.
Zero can also be the honest display of an illegal value: raw meter bytes decoded under the wrong type land as a denormal close to zero, which is why watch-table legality is checkpoint one rather than an afterthought.
Set the format for the display unit, not for the controller's full precision: the calculation keeps its digits in the PLC, and the screen needs the digits the operator acts on.
Verify the whole path before closing out #
Make one change at a time and follow one value end to end:
- Enter a known test total in the PLC, in real engineering units, and record it.
- Confirm the derived display member equals the internal total after the unit conversion, before any rounding.
- Monitor the tag and confirm it equals the display member — not merely that it stopped showing zero.
- Read the runtime field and confirm it matches the tag after the configured rounding, with the unit label correct.
- Move the process to a second operating point and repeat the four steps above, so you know the field follows the value instead of showing a stale one.
When the PLC member, the derived display member, the tag and the field agree at both operating points, the display path is proven. Any later 0.0 on that field is then a new fault at a named checkpoint, and you already know which checkpoint to open first.
Questions asked
How do I know whether my tag can carry the full 64-bit value?
Open the tag editor for your target and read the data type list it offers. If the list stops at the 32-bit floating type, the tag cannot carry the full 64-bit value and holds a rounded copy with roughly seven significant digits, which matches Siemens' documented rounding for 64-bit PLC data types mapped to HMI types in WinCC Basic, Advanced and Professional. Keep the LREAL in the PLC for processing either way.
The LREAL comes from an external meter over Modbus TCP. Does the same order apply?
Yes, with one extra check at the first checkpoint. Eight bytes arrive as words whose order the tag or gateway mapping must reverse correctly; when the halves are swapped, the decoded floating value is usually a denormal so small it displays as 0.0, or a wild number, while the bytes themselves are intact. Confirm the word order before blaming the I/O field, and prove the decoded value in the watch table first.
The tag monitors a correct small value but the field still shows 0. Why?
The format pattern is rounding it away for display. A pattern with no decimal places shows a value of 0.4 kWh as 0, and one decimal place shows 0.04 kWh as 0.0. Count the digits the operator acts on, open the field's format settings, and set the decimal places for the display unit rather than for the raw tag precision.
Should the watt-hour to kilowatt-hour conversion run in the PLC or in a script on the HMI?
Run it in the PLC. A script that reads the tag on its own cycle adds an update delay of its own, keeps the scaling logic in a second place, and can leave the display stale after a runtime restart until the script fires again. One derived data-block member, one tag and one field assignment keep the displayed number tied to the value the controller actually computed.