Configuring Modbus Holding Registers in Siemens LOGO! Web Editor
1. The Problem in One Sentence
LOGO! Web Editor v1.1.0 only exposes a fixed set of variable block types — AI, AQ, AM, VB, VD, VW — through its Tag Table. None of them is named "Holding Register", and LWE has no direct register-address field, so a slider or numeric display cannot be bound to a Modbus object directly. The only way to surface Modbus data on an LWE page is to (a) read the registers with the LOGO!'s built-in Modbus client, (b) write the results into Variable Memory, and (c) bind the LWE widget to the matching VM address.
The most common symptoms reported on commissioned systems are:
- An LWE widget bound to "the Modbus variable" shows a stale or zero value, or no value at all.
- Values appear at the wrong offset — for example the slave's register 1 and register 2 both displaying the same number.
- Adding one register to the configuration that does not exist on the slave erases visibility of every other valid register.
All three are configuration problems in the LOGO! Soft Comfort project, not defects in LWE. This article walks through the correct configuration and the recovery actions for each symptom.
2. How LWE Talks to the Network
LWE v1.1.0 is a server-side web visualization embedded in the LOGO! 8 base module firmware. It does not implement Modbus; it polls the LOGO! firmware's internal memory only. The Modbus client lives in the LOGO! itself and writes the fetched values into VM, which is what LWE binds to. The full data path is:
Three configuration boundaries must be set up, in this order:
- The Modbus client connection in LOGO! Soft Comfort (Tools → Ethernet).
- The VM mapping that publishes the fetched registers into named memory areas (Tools → Parameter VM Mapping).
- The LWE tag table that binds those VM areas to a slider, numeric display, or indicator (LWE → Global Configuration → Tag Table).
3. Prerequisites
| Item | Required value | Verification |
|---|---|---|
| LOGO! 8 base module | 8.FS4_1 (or any 8.FS4 with firmware ≥ 1.82.04) | Read on the LOGO! display under Info → FW or from the LSC online status |
| LOGO! Soft Comfort | Version 8.2 minimum, current SP recommended for FS4 support | Help → About in LSC |
| LOGO! Web Editor (LWE) | v1.1.0 | LWE → Help → About |
| Ethernet LAN | Slave reachable on TCP/502 from the LOGO! | Ping the slave from a PC on the same VLAN |
| Modbus slave | Modbus TCP/IP server exposing Function Code 3 (Read Holding Registers) | Verify with a third-party Modbus master (e.g. modpoll, mbpoll) |
4. Variable Type Mapping for Modbus Objects
A Modbus holding register is 16 bits wide per the Modbus Application Protocol specification, so it pairs naturally with the LOGO!'s VW (Variable Word) memory type. The direct guidance from the commissioning thread is:
A holding register in Modbus is mostly an integer value — so in LWE you need to use VW.
| Modbus object | Function codes | Native size | LOGO! memory | LWE block type | Typical data |
|---|---|---|---|---|---|
| Holding Register | FC 3, FC 6, FC 16 | 16-bit | VW (one word) | VW | Signed/unsigned integer, 0–65535 unsigned |
| Holding Register pair | FC 3, FC 16 | 32-bit | VD (double word) | VD | Real (IEEE-754) or DInt |
| Input Register | FC 4 | 16-bit | VW | VW | Read-only integer (slave → LOGO! only) |
| Coil | FC 1, FC 5, FC 15 | 1-bit | M (marker bit) or VB bit | M / VB | Boolean (R/W) |
| Discrete Input | FC 2 | 1-bit | M or VB bit | M / VB | Boolean (read-only) |
Decision path for the setpoint + actual value use case:
- If both registers are documented as 16-bit integers, bind each to a single
VWand use a numeric display widget in LWE. - If the process value is a 32-bit float (very common for VFDs, energy meters, and temperature controllers), bind it to a
VDand read two consecutive Modbus registers. The two 16-bit words must be combined in the order the slave presents them — big-endian (most significant word first) on the majority of process instruments, little-endian on many low-cost PLCs. A swapped word order is the most common cause of "almost right" floats. - If the value is signed, check whether the slave uses two's-complement 16-bit (range −32768 to +32767) or a sign-magnitude / sign-bit convention. The LOGO!
VWinterprets the raw register as a 16-bit signed integer.
5. Step-by-Step Configuration
5.1 Create the Modbus Client Connection in LOGO! Soft Comfort
- Open the LSC project that is loaded into the target LOGO! 8.FS4.
- Go to Tools → Ethernet → Create Modbus client connection (the menu may be labeled "Ethernet Connections" depending on the LSC service pack).
- Configure the connection block:
- Remote IP address: the IP of the Modbus TCP/IP slave.
- Port: 502 (Modbus TCP/IP default).
- Unit ID / Slave ID: the slave's Unit Identifier. Confirm with the slave's documentation; 1 is the most common default, 255 is a broadcast/ignore value that some gateways interpret as "any".
- Protocol: Modbus TCP (not Modbus UDP, even though LOGO! firmware 1.82.x also supports UDP clients).
- Polling interval / timeout: a 1000–2000 ms cycle is the typical starting point. Sub-100 ms cycles can starve the LWE web server and produce erratic page refreshes.
- Save the project and transfer it to the LOGO! 8 base module.
5.2 Configure the Variable Memory (VM) Mapping
- In the same LSC project, go to Tools → Parameter VM Mapping.
- For every Modbus holding register that LWE must read, add a row that reads address N from the Modbus client connection and writes the result into VM address V.
- Select the correct data width for each row:
- One 16-bit holding register → map into a single
VWin VM (e.g.VW100for the setpoint). - Two 16-bit registers forming one 32-bit float → map into a single
VD(e.g.VD102for the process value).
- One 16-bit holding register → map into a single
- Record the VM addresses you used. LWE will reference exactly these addresses in its Tag Table.
Example VM mapping for the setpoint + actual value scenario:
| Modbus register | Data type | VM target | Read/Write |
|---|---|---|---|
| HR1 (setpoint) | 16-bit unsigned int | VW100 | Read/Write (slider in LWE writes back via FC 6) |
| HR3 / HR4 (process value, 32-bit float) | IEEE-754 single, big-endian | VD102 | Read only |
5.3 Declare the Tags in LOGO! Web Editor
- Open the LWE v1.1.0 project that ships with the LSC project (LSC → Tools → LOGO! Web Editor).
- Open Global Configuration → Tag Table.
- Add a new tag for each VM word:
-
Name: a meaningful, project-wide identifier such as
Setpoint_SPorProcessValue_PV. -
Type:
VW(16-bit signed integer) for the 16-bit registers;VDfor the 32-bit ones. -
VM Address: the exact VM address you used in step 5.2 (e.g.
100,102). Address values are decimal in LWE. - Access: Read for displays, Read/Write for the slider that writes the setpoint back to the slave.
-
Name: a meaningful, project-wide identifier such as
- Drop a numeric widget, gauge, or slider on the LWE page and bind it to the tag by name.
- Generate the web project and download it to the LOGO! 8 base module.
6. Address Numbering: 0-Based vs 1-Based
Modbus is consistently 0-based in its Protocol Data Unit (PDU): register address 0 in FC 3 reads the first holding register on the wire. Many HMIs and SCADA packages expose a 1-based view to users, which is exactly where the off-by-one confusion in the source thread comes from. The direct quote from the commissioning thread:
With the LOGO! the register addresses start with 1, not with 0. If they start at 0, you have to go to LOGO! then use HR4 instead of HR3 and then HR2 instead of HR1.
A second confirmation from the same thread: I'm reading address 1 instead, on LOGO! it gets the same data on address 2. That is a 0-based slave being addressed as if it were 1-based — register 1 on the slave (PDU address 0) is appearing at LOGO! HR2.
| Slave Modbus address (0-based PDU) | Address to enter in LOGO! (1-based UI) | Equivalent in a 1-based SCADA (4xxxxx) |
|---|---|---|
| 0 | HR1 | 400001 |
| 1 | HR2 | 400002 |
| 2 | HR3 | 400003 |
| 3 | HR4 | 400004 |
| 99 | HR100 | 400100 |
Decision path when the slave's documentation is ambiguous about the base address:
- If the slave documents its registers as "Register 1" / "Addr 1" and a third-party Modbus master reading register 1 returns the expected value, treat the slave as 0-based and enter HR2 in the LOGO!.
- If the slave documents its registers as "Register 0" / "Offset 0", enter HR1 in the LOGO!.
- When in doubt, force a known value (e.g. write
12345to register 0 with modpoll) and probe HR1, then HR2, then HR3 in the LOGO! VM mapping until the value appears. This is the empirical "find the offset" workflow that resolves the ambiguity in seconds.
7. Connection Tuning: Unit ID, Polling, and Timeouts
Three connection parameters control whether a single read succeeds or silently fails. Tuning them is the single biggest factor in field reliability.
| Parameter | Typical value | Failure mode if wrong | How to verify |
|---|---|---|---|
| Unit ID (Slave ID) | 1 (most PLCs, VFDs, energy meters) or as documented | All reads return 0; Modbus exception 0x0A on the slave | Read the slave's status counters; Wireshark on port 502 |
| Port | 502 | TCP connection timeout; LWE widget stays at last value | telnet to the slave on 502 from a PC |
| Polling interval | 1000–2000 ms | Web page stalls; LWE connection drops; VM stops updating | Watch the VM area in LSC online mode at high frequency |
For a deeper protocol primer — function codes, exception codes, and gateway behavior — the ProSoft Modbus and Modbus TCP/IP FAQ is a useful consolidated reference.
8. Handling Missing Registers and Modbus Exceptions
The reported behavior — adding a non-existent register to the VM mapping and losing visibility of every other valid register — is a known characteristic of the LOGO! 8.FS4 Modbus client. The client groups the requested registers into a single FC 3 transaction; if the slave returns a Modbus exception, the LOGO! discards the entire transaction rather than committing the partial values it did receive.
Mitigations, in order of preference:
- Group valid addresses contiguously. Build one FC 3 request that covers the live registers in a single contiguous block, and a separate FC 3 request for the optional / diagnostic registers, so a missing address only fails its own block.
- Pre-validate the slave's register map. Use a generic Modbus master (modpoll, mbpoll, any SCADA's Modbus driver tester) to scan the address space before commissioning. Record the actual valid range and use only that range in the LSC VM mapping.
- Insert a Modbus gateway with a validity map. A gateway such as the Advantech EKI-1200 series can be configured to pre-screen requests and present the LOGO! with a clean, exception-free register space.
- Bound the polling rate. Keep the LWE polling interval ≥ 1 s. The LOGO! 8.FS4 web server and the Modbus client share the same Ethernet stack and the same CPU; a runaway poll rate can starve one or both.
8.1 Modbus Exception Codes You Will See in Wireshark
When a read fails on the wire, the slave replies with an exception function code (FC | 0x80) and a sub-code. Knowing the sub-code saves a Wireshark session.
| Sub-code | Name | Typical cause | Fix |
|---|---|---|---|
| 0x01 | Illegal Function | LOGO! sent FC that the slave does not implement (e.g. FC 15 on a basic meter) | Check the slave's supported FC list; use FC 3 / FC 6 only |
| 0x02 | Illegal Data Address | Address is outside the slave's valid range, or the off-by-one shift is wrong | Re-validate the address map; follow Section 6 |
| 0x03 | Illegal Data Value | Quantity or value field is out of range | Reduce the quantity; check word-order on 32-bit values |
| 0x04 | Slave Device Failure | Unrecoverable error in the slave (sensor fault, etc.) | Investigate the slave; not a LOGO! issue |
| 0x06 | Slave Device Busy | Slave is processing a long operation | Increase the LOGO! timeout; add a longer settle time |
| 0x0A | Gateway Path Unavailable | Configured Unit ID is not reachable through the gateway | Verify Unit ID; if behind a router, check the routing table |
| 0x0B | Gateway Target No Response | The downstream device did not answer the gateway | Check the RTU network; verify termination resistors |
9. Diagnostics, Exception Codes, and Round-Trip Writes
There is no per-tag Modbus health LED inside the LWE page itself. The available debug surfaces, from cheapest to most authoritative:
- LOGO! display / TDE: the base module's on-screen status shows the Ethernet connection state, the assigned IP, and a connection error code if the Modbus client cannot reach the slave.
- LOGO! Soft Comfort online mode: the online view of the VM area lets you watch the fetched values in real time, independent of LWE. If the VM area is updating correctly and LWE shows stale data, the bug is in the LWE tag binding, not the Modbus link.
- Slave-side counters: a Modbus slave with diagnostics (most modern VFDs, energy meters, and PLCs) will show incremented "valid request" / "exception" counters — use these to confirm the LOGO! is actually talking to it.
- Network capture: Wireshark on the slave's switch port with the Modbus/TCP dissector enabled is the most authoritative tool. Confirm unit ID, function code, address range, response time, and exception responses from a single capture.
9.1 Putting a Value Back: Writing a Setpoint from the Slider
A slider in LWE v1.1.0 can be configured as Read/Write. The write side ends up at the same VM address declared in the Tag Table, but to actually reach the slave the VM area must be re-published to the Modbus client — done in LSC by adding the VM address to the Modbus client connection's write list (FC 6 for a single register, FC 16 for multiple). The complete round-trip is:
Without the FC 6 / FC 16 write registration in the LSC project, the slider's value sits in VM but never reaches the slave, and the operator sees a "dead" control. Always confirm the slave register is actually being written by reading it back with a third-party tool, and check the slave's "valid write" counter if it exposes one.
10. Verification Checklist and Troubleshooting Matrix
| Check or Symptom | Pass criterion / Likely cause | First action | Reference |
|---|---|---|---|
| LINK LED on LOGO! Ethernet port | Steady green | Replace cable / switch port if dark | §7 |
| IP shown on LOGO! display under Network | Matches the LSC project | Re-transfer the LSC project; reboot the LOGO! | §5.1 |
| LSC online → VM area | Every VW / VD bound to a Modbus address is updating |
If static, check the Modbus connection status; ping the slave | §5.2, §9 |
| LWE tag table | Every tag shows the expected VM address; no orange / red indicator | Re-import the project; regenerate the web project | §5.3 |
| LWE page forced-write test | A forced value at the slave (e.g. 12345) appears in the widget within one polling cycle | If it does not, the bug is in the VM mapping or the LWE tag binding, not the network | §5.3, §6 |
| Slider round-trip | Dragging the LWE slider changes the value at the slave | Add the VM address to the LSC write list (FC 6 / FC 16) | §9.1 |
| Disconnect test (slave powered off) | LWE widget freezes on the last value rather than flickering or showing 0 | Expected behavior of the LOGO! 8.FS4 Modbus client | §8 |
| All widgets show 0 or "—" | Unit ID wrong, slave unreachable, or VM mapping not generated | Ping the slave; check Unit ID; regenerate the web project | §5.1, §7 |
| One register shows the value of its neighbor | Off-by-one addressing (0-based vs 1-based) | Follow the empirical "find the offset" workflow | §6 |
| Adding a register kills all other data | Invalid address triggers a Modbus exception; LOGO! drops the whole transaction | Group valid addresses contiguously; pre-validate the map | §8 |
| Slider value never reaches the slave | VM address not in the Modbus write list | Add the VM address to the LSC write list (FC 6 / FC 16) | §9.1 |
| Float value is wildly wrong (0, NaN, or huge) | Word order swapped, or wrong VM width (VW instead of VD) | Switch to VD and reverse the word order |
§4 |
| Web page refresh is slow / stalling | Polling interval too aggressive, shared CPU | Raise the polling interval to ≥ 1 s | §7 |
| Exception 0x02 in Wireshark | Address out of range or off-by-one | Re-validate the slave's register map | §6, §8.1 |
| Exception 0x0A in Wireshark | Unit ID not reachable through a gateway | Verify Unit ID and gateway routing | §7, §8.1 |
11. Frequently Asked Questions
Why is there no "Holding Register" block type in LWE v1.1.0?
LWE exposes only LOGO! internal memory types — AI, AQ, AM, VB, VD, VW — because it polls the LOGO! firmware directly, not the Modbus slave. The Modbus client is configured separately in LOGO! Soft Comfort, and its results are written into VM, which is what LWE binds to. A 16-bit holding register maps to a VW in both LSC and LWE; a 32-bit holding register pair maps to a VD.
Why does my LWE widget show a different value than the slave, and why does register 1 look like register 2?
This is a 0-based vs 1-based addressing mismatch. Modbus PDU addresses are 0-based, but the LOGO! datatable is 1-based. If your slave uses 0-based addresses, add 1 to every HR number you enter in the LOGO! configuration. The empirical fix is to write a known value (e.g. 12345) to slave register 0 with a third-party tool and probe HR1, HR2, HR3 in the LOGO! until the value appears.
Adding a single non-existent register kills all my other data. How do I recover visibility?
The LOGO! 8.FS4 Modbus client groups the requested registers into a single FC 3 transaction. If the slave returns an exception, the whole transaction is dropped. Split the VM mapping into smaller contiguous blocks so an invalid register only fails its own block, verify the slave's register map with a third-party Modbus master, or insert a Modbus gateway (e.g. Advantech EKI-1200) to pre-screen requests.
My Unit ID is 255 and nothing reads — is that correct?
Unit ID 255 is valid but is the "ignore / broadcast" value. Most Modbus slaves default to Unit ID 1; some VFDs use 2 or 3. Check the slave's manual and change the Unit ID in the LOGO! Modbus client connection to match. A wrong Unit ID produces zero reads or Modbus exception 0x0A on the wire.
Where do I see a per-tag Modbus connection status in LWE?
There is no per-tag status in LWE v1.1.0. Diagnose from the LOGO! side: watch the VM area in LOGO! Soft Comfort online mode, check the Ethernet status on the LOGO! display or TDE, and capture the wire with Wireshark using the Modbus/TCP dissector to confirm FC 3 / FC 6 / FC 16 traffic, the Unit ID, and any exception responses. For a broader protocol primer, the ProSoft Modbus and Modbus TCP/IP FAQ covers the most common function codes and gateway behaviors.