Troubleshooting S7-1200 REAL Values on Weintek HMI

David Krause6 min read
S7-1200SiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

After replacing the rotated PLC value with a correctly typed S7 tag, the Weintek HMI should display the same REAL value shown online in the S7-1200. Apply the decision sequence below before changing any additional strings or numeric values.

Data-representation mechanism

An S7-1200 REAL occupies 32 bits. The four bytes have meaning only when the HMI reads the correct starting address, applies the correct data type, and interprets the transfer through the configured PLC driver. A wrong offset, mismatched type, incompatible absolute-access configuration, or inappropriate protocol selection can make a valid PLC value appear byte-swapped.

Ethernet identifies the network medium and link technology; it does not identify the application protocol or its data mapping. The driver selected in EasyBuilder Pro determines how PLC addresses, symbols, strings, and multi-byte values are transported. Before diagnosing endianness, identify whether the device uses the Siemens absolute-addressing driver, Siemens symbolic-addressing driver, Modbus TCP, or another application protocol.

A rotate-right operation is not a data-format correction. ROR cyclically moves bits within its operand. It may make one test pattern appear correct, but it changes the PLC data presented to every consumer and can fail for other values or types. Strings must not be reversed to compensate for an unresolved numeric-tag problem.

Observed result Most useful interpretation Next check
PLC value is correct; HMI value is wrong Connection, address, or HMI type mapping is wrong Check the configured driver and tag definition
Symbolic tag works; absolute tag fails The fault lies in absolute address resolution or data-block layout Review the absolute offset and block access mode
All multi-byte values show a repeatable word-order error The selected application protocol may use a different register ordering Confirm the actual driver, especially before applying Modbus remedies
Only one tag fails A tag-specific type, offset, or source-variable error is more likely than global endianness Compare that tag with a known test tag

Check 1: Configured communication driver

  1. Open the HMI device configuration in EasyBuilder Pro 6.10. Read the complete driver name, not merely the Ethernet interface selection. Expect a Siemens S7 driver when exchanging native S7 types.
  2. If the driver is Siemens Absolute Addressing, continue to Check 2. Absolute access requires the HMI address and the compiled PLC memory layout to agree exactly.
  3. If the driver is Symbolic Addressing, skip to Check 3. The HMI should resolve the PLC variable by symbol and type instead of relying on a manually entered byte offset.
  4. If the selected driver is Modbus TCP or another register protocol, stop applying S7 address assumptions. Read the driver's register-order setting and mapping documentation; a Modbus word-order issue requires correction in that driver or tag configuration, not a PLC ROR.

Check 1 expected reading: the application protocol and addressing mode must be identifiable from the configured device. If the only known fact is “Ethernet,” the communication setup has not yet been characterized sufficiently to diagnose byte order.

Check 2: PLC value and HMI tag definition

  1. Monitor the unmodified source variable online in TIA Portal. Hold it at a known, stable test value. Expect the PLC watch value to remain correct without ROR.
  2. Read the PLC declaration. Expect the source and HMI tag to use the same semantic type: REAL for the reported floating-point value. Do not map it as an integer, two independent words, or raw bytes.
  3. For absolute addressing, obtain the compiled byte offset from the PLC project. Expect the HMI address to identify the first byte of the four-byte REAL. An offset displaced by one or two bytes produces a different bit pattern rather than a scaled version of the original value.
  4. Confirm that the HMI tag belongs to the intended PLC connection and data block. Expect the connection, block, offset, and type to describe one PLC variable without overlap.

If the PLC watch value is already wrong, repair the PLC calculation before continuing. If the PLC value is correct and the four address components match, continue to Check 3. If the address cannot be derived reliably from the compiled block, use symbolic access or change the block configuration to one compatible with absolute access.

Check 3: Absolute versus symbolic access

Symbolic addressing resolves a declared PLC variable through its symbol rather than treating the data block as a fixed byte array. Absolute addressing depends on a stable, externally accessible layout. Data-block optimization can decouple a variable's logical declaration from the fixed offset expected by an external absolute-address client.

  1. Create or select one unmodified PLC REAL as the diagnostic tag. Do not test through the rotated intermediate value.
  2. Bind that variable through Symbolic Addressing. Expect the HMI display to match the online PLC value.
  3. If symbolic access works, the network path and PLC value representation are functioning. The resolving branch is to keep symbolic tags, or separately correct the absolute data-block layout and address before returning to absolute access.
  4. If symbolic access fails, compare the selected symbol, declared type, active PLC connection, and PLC access configuration. Expect all four to identify the same variable. A failure here is not proof of byte reversal.

For an absolute-address design, inspect the PLC block properties and the driver's connection guide for the required access mode. Then regenerate the offset from the compiled project and enter that offset once. Never derive subsequent addresses by guessing from the preceding tag, particularly when strings and mixed data types share a block.

Corrective configuration procedure

  1. Record the current HMI driver, every affected tag type, and each PLC source variable. Retain the existing project as a rollback point.
  2. Remove ROR from the HMI data path so the test uses the original REAL. If other logic consumes the rotated value, isolate that logic before changing it.
  3. Configure the Weintek device for Symbolic Addressing and bind the display object directly to the PLC symbol. Keep the HMI type aligned with the PLC declaration.
  4. Download the HMI project and test one REAL before converting the remaining tags.
  5. Add strings and other values by their declared types. Do not apply byte reversal globally. A string has type-specific layout rules and must be handled by the Siemens driver as a string.
  6. If absolute addressing is mandatory, restore it only after confirming a compatible PLC block layout, the exact compiled starting offset, and the matching HMI type. Test each data-type boundary rather than copying an assumed address sequence.

Numbered verification readings

  1. Check 1: Write or calculate a stable REAL in the PLC. Expect the TIA Portal watch value and HMI display to match numerically without ROR.
  2. Check 2: Test a second REAL with a different sign or fractional portion. Expect it to match as well; success with multiple bit patterns rules out a correction that only happened to fit one value.
  3. Check 3: Change the PLC value while online. Expect the HMI to update through the intended tag and no neighboring HMI tag to change unexpectedly.
  4. Check 4: Test one string through its declared string tag. Expect the character sequence to appear in the same order as the PLC value, with no manual byte or character reversal.
  5. Check 5: Recompile and download the PLC project, then repeat the numeric comparison. Expect symbolic tags to retain their association; an absolute design must still point to the verified compiled offsets.

FAQ

How do I fix a reversed REAL value from an S7-1200?

Remove the ROR, select the native Siemens driver, and map the PLC and HMI tags as REAL. If an absolute tag still fails, bind the same source through Symbolic Addressing to isolate an offset or block-layout problem.

How do I know whether the problem is byte order or a bad address?

Compare one unmodified PLC value through symbolic and absolute tags. If symbolic access matches while absolute access does not, inspect the absolute starting offset and data-block access mode rather than changing byte order.

How do I verify strings and REAL values after the change?

Test at least two distinct REAL values and one declared string, then recompile and download the PLC project. Expect every HMI value to match its online PLC value with no rotation, word swap, byte reversal, or neighboring-tag change.

Back to blog