IMDTouchKnowledge BaseShop main store

Troubleshooting

Why a Weintek trend plots zero when the PLC value shows correctly

HMI and touchscreens Published 8 min read By IMDTouch engineering team

Short answer

The numeric object proves the panel already decodes the FLOAT at 4x-21 correctly. The trend plots 0 because the Data Transfer never triggered or copied the words in the wrong order, or the Data Sampling object still reads a 16-bit format. Copy 2 words into LW11000 and LW11001, set the sampling format to 32-bit float, or point the sampling object straight at PLC register 21.

On this page
  1. What the working numeric object rules out
  2. Where a two-word value breaks in a one-word chain
  3. Worked example: what 21.4 °C reads as in each format
  4. Isolate the broken link with two numeric objects
  5. Correct the Data Transfer and Data Sampling settings
  6. Sample the PLC register directly
  7. The integer times ten fallback
  8. Prove the fix and close each case
  9. Questions asked

The numeric object on 4x-21 already shows the right temperature, so the PLC link and the float decoding work. The zero is created after that object, in the copy chain that feeds the pen. A FLOAT at 4x-21 occupies two registers, 4x-21 and 4x-22, so the Data Transfer must fill two local words, LW11000 and LW11001, and the Data Sampling object must read them as 32-bit float. Where the transfer never triggers, LW11000 keeps its power-up value of 0 and the trend plots 0 no matter which format you select. What follows shows what each fault reads like on real numbers, the settings that fix it, and the direct-sampling route that removes the copy step.

What the working numeric object rules out #

A numeric object reading the live temperature clears three suspects at once:

  • The PLC connection and driver. A dead link shows 0 or a communication error, not the right value.
  • The register map. 4x-21 is the correct address.
  • The float decode. The object's format setting already reads both words of the value correctly.

The fault therefore sits in the path from that object to the pen: the Data Transfer object, the Data Sampling object, or the trend display that references it. Three tempting moves reproduce the same zero, so skip them:

  • Rebuilding the trend from the same instruction a second time. The chain already exists, and a copy with the same formats gives the same 0.
  • Changing the PLC address. The numeric object proves 4x-21 is read correctly; the PLC side is not at fault.
  • Typing 21 instead of 11000 while the read address still says Local HMI. LW is the panel's own word memory, and Local HMI address 21 is a different register from PLC register 21; nothing writes it.

Where a two-word value breaks in a one-word chain #

A Modbus holding register is 16 bits. A 32-bit FLOAT occupies two consecutive registers, and the numeric object works because its format reads both. Every object after it must handle two words as well:

  • Data Transfer copies 4x-21 to LW11000. For a float the copy must fill LW11000 and LW11001, a length of 2 words.
  • Data Sampling reads LW11000. Its data format must be 32-bit float. A 16-bit format reads half the float — the raw word as a plain count, far outside any axis scaled in °C.
  • The trend display plots the sampling object. Its Y-axis range must contain the real temperature span.
  • The transfer trigger must fire continuously. A transfer that never fires leaves LW11000 at its power-up 0 — the flat zero you are looking at.

The sampling object does not inherit the numeric object's format or word-order setting. Whatever makes the object on 4x-21 read correctly must be repeated in the Data Sampling format.

Worked example: what 21.4 °C reads as in each format #

The inputs:

  • Process value: outside-air temperature, example 21.4 °C with one decimal — the kind of value this chain carries.
  • Encoding: IEEE-754 single precision, the layout of a Modbus FLOAT — 1 sign bit, 8 exponent bits, 23 fraction bits.
  • Location: the value occupies 4x-21 and 4x-22; here 4x-21 carries the high word, matching the word order the working numeric object uses.
  • Copy destination: LW11000 for the high word, LW11001 for the low word.

The rule: encode the temperature as a 32-bit float, split the 32 bits into two 16-bit words, then decode what each fault configuration reads from the local words.

The arithmetic:

  • 21.4 in binary is 10101.0110 0110 0110 ..., which normalizes to 1.01010110011001100110011 × 2^4.
  • Exponent field: 4 + 127 = 131, binary 10000011.
  • Assembled: 0 10000011 01010110011001100110011, in bytes 01000001 10101011 00110011 00110011, which is 0x41AB3333.
  • High word: 0x41AB = 4×4096 + 1×256 + 10×16 + 11 = 16811. Low word: 0x3333 = 3×4096 + 3×256 + 3×16 + 3 = 13107.

The result, decoded five ways:

  • Both words copied, sampled as 32-bit float: 21.4 °C — the chain is correct.
  • LW11000 read alone as 16-bit: 16811, the bit pattern as a count.
  • Only the high word copied, low word left at 0: 0x41AB0000 decodes to 21.375 °C — nearly right, so this fault hides.
  • Words copied in the wrong order: 0x333341AB decodes to roughly 0.00000004 °C — the pen rides the zero line.
  • Transfer never ran: exactly 0.

The decision: read LW11000 with a numeric object set to 32-bit float. Exactly 0.0 means the copy never runs — fix the transfer's trigger and addresses before touching any format. Any wrong nonzero number means the copy runs, and the fault is the word count, the word order or the sampling format.

  1. Place a numeric object on Local HMI LW11000 with format 32-bit float.
  2. Place a second on Local HMI LW11001 with format 16-bit unsigned.
  3. Compare both against the working object on 4x-21 and read the table.
LW11000 as 32-bit float LW11001 as 16-bit unsigned Cause Fix
Exactly 0.0 0 The transfer never runs, or its source or destination is wrong Source PLC 4x-21, destination Local HMI LW11000, trigger set to run continuously
Same value as the PLC object Non-zero (13107 in the example) Copy correct; sampling format or trend range wrong Data Sampling format 32-bit float; check the Y-axis range
Slightly off (21.375 °C in the example) 0 Only one word copied Transfer length 2 words
A near-zero such as 0.00000004 °C Non-zero Both words copied in the wrong order Match the word order that makes the PLC numeric object read correctly

A PLC value that is right only intermittently points off the panel: another PLC tag overlapping 4x-22 overwrites the low word. Check the PLC variable map for a second tag on the adjacent register.

Correct the Data Transfer and Data Sampling settings #

  1. Open the Data Transfer object. Set the source to the PLC device at 4x-21 — not Local HMI — and the destination to Local HMI LW11000.
  2. Set the copy to 2 words (32-bit) with the length or format setting the object offers, so LW11001 fills as well, using the word order that makes the PLC numeric object read correctly.
  3. Set the trigger so the copy runs continuously in the background. A transfer that fires once, before communication is up, leaves the power-up 0 in place for good.
  4. Open the Data Sampling object. Set the read address to Local HMI LW11000 and the data format to 32-bit float.
  5. Open the trend display. Confirm it references this sampling object, and set the Y-axis minimum and maximum wider than the real span — for outside air, from the winter minimum to the summer maximum.
  6. Compile, download, and test on the panel with the PLC connected.

Sample the PLC register directly #

The Data Sampling read address does not have to be a Local HMI word. Set the device in the read address to the PLC instead, enter register 21 (or 00021), and select 32-bit float. The Data Transfer object and the LW11000 intermediate disappear, and with them two of the three places where a format can go wrong.

Keep the copy route only when other panel logic needs the value in local memory, or when one copy feeds several sampling objects. If several sampling objects feed one trend and only some pens plot, the bindings between them are the suspect — see why four data sampling objects don't fill one trend display.

Direct sampling adds one more read of that PLC address to the panel's communication cycle for each sampling object. With a handful of channels that is negligible; with many channels at fast sample rates, measure the panel's update time before committing.

The integer times ten fallback #

The PLC can instead send the temperature as a 16-bit integer with one implied decimal: multiply by 10 in the PLC, and 21.4 °C leaves as 214. One word for each channel — no word order, no two-word copy. Three conditions apply:

  • Use 16-bit signed in the numeric object, the sampling format and the trend, so negative winter temperatures do not wrap to large positive values.
  • Apply the divide-by-10 scaling where the panel supports it; check the scaling options your EasyBuilder Pro version offers instead of guessing a field name. If object scaling cannot divide by ten, a script can — the pattern is in scaling a 32-bit float Modbus value in an HMI script.
  • Every reader of that register — SCADA, other panels, PLC logic — must use the same times-ten convention.

Decision: use this as the restore when production needs the trend tonight and float sampling still fails after the checks above. It reworks every variable, so on a chain where the float already decodes correctly it buys nothing — fix the formats instead.

Prove the fix and close each case #

Run the acceptance checks on the connected panel:

  • Read the PLC numeric object, the LW11000 float object and the trend cursor side by side; all three must agree to the displayed precision.
  • Step the temperature by a known amount in the PLC and watch the pen move within one sampling period.
  • Let it run several sampling periods and confirm points keep accumulating, not just one.
  • Power-cycle the panel. If history must survive restarts, confirm the sampling object's storage setting retains it and the chain restarts without a manual trigger.

Then close the case you have:

  • The LW11000 float object reads exactly 0.0 — the copy never runs; fix trigger and addresses first.
  • It reads a wrong nonzero number — word count, word order or sampling format; set 2 words, match the order, choose 32-bit float.
  • It reads correctly but the pen stays flat or clips at an edge — the trend display's Y range or its reference to the sampling object.
  • You want the fewest settings — sample PLC register 21 directly as 32-bit float.
  • Float sampling still fails after all of the above — integer times ten as 16-bit signed, with the divide-by-10 scaling.

Questions asked

Why does the trend still show 0 in offline simulation after the fix?

Offline simulation has no PLC connection, so nothing updates 4x-21 and the Data Transfer copies nothing. LW11000 stays at its power-up 0 and the sampling object faithfully records that 0. A flat zero offline proves nothing either way: run the test on the panel itself, or in online simulation with the PLC connected.

How many registers does a 64-bit value need, and can the panel sample it?

A 64-bit type such as a double occupies four consecutive 16-bit registers, so the same chain logic applies with a copy length of 4 words. The release notes for EasyBuilder Pro V6.06.01.631 list added 64-bit addresses IL, QL and ML for absolute Ethernet addressing, plus data types such as LTIME. Confirm your project version includes that support before building on it.

What resolution and range does the integer times ten method give?

One implied decimal gives steps of 0.1 °C. A 16-bit signed register holds -32768 to 32767, which scaled is -3276.8 to 3276.7, far beyond any outside-air range. The price is convention: every reader of the register must divide by 10, and the panel must never display the raw 214 as 214 degrees.

Can several Data Sampling objects share one Data Transfer?

Yes. One transfer into LW11000 and LW11001 can feed several sampling objects and any other panel logic that reads those local words, and it keeps repeated reads of the PLC address out of the communication cycle. Sharing the copy does not share the format: each sampling object still needs its own data format set to 32-bit float.

Keep reading

  • Troubleshooting

    Displaying a PLC Real Value Over Modbus on an HMI

    An INTEGER display that reads the register proves the link, station and address, so a blank REAL display is a 32-bit mapping fault. Declare the HMI variable as a 32-bit float on the register pair (40064/40065), set the device double-word order to Low Word First to match the PLC, and give the numeric field six integer digits for 628402.0.

    HMI and touchscreens

  • Troubleshooting

    Why a WinCC Unified trend stays empty until its value changes

    A WinCC Unified trend in its default Online configuration draws a sample only when the selected tag's value changes, so a correctly assigned constant tag leaves the plot empty. Confirm the runtime source switch separately, then force one distinguishable value change within the Y-axis range to prove the trend path works.

    HMI and touchscreens

  • Explainer

    Why four data sampling objects don't fill one trend display

    A trend display draws from one data sampling object's recorded channels; it never merges several sampling objects on its own. Move the four BACnet temperature tags into one Data Sampling object, then select four channels in the trend display's settings. Live tag values prove the network path, not that sampling or the trend binding is correct.

    HMI and touchscreens

How to Make Arrow Bitmap Buttons in WinCC Touch Panels