Configuring Modbus TCP/IP on Siemens LOGO! 8 (0BA8): Setup Guide

David Krause14 min read
HMI ProgrammingSiemensTutorial / How-to
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

Overview

The Siemens LOGO! 8 logic module (order suffix 0BA8) introduced native Modbus TCP/IP support starting with hardware revision FS04 and firmware 8.1.x. Earlier revisions (FS01-FS03) cannot speak Modbus on either the Ethernet or the RS-485 port, and no LOGO! 0BA8 variant can speak Modbus RTU natively on the RS-485 interface. To bridge RTU devices you must use an external Modbus RTU-to-Modbus TCP/IP gateway that exposes the RTU slaves as Modbus TCP servers on the LOGO!'s Ethernet network.

This reference covers three deployment topologies:

  1. LOGO! 8 as a Modbus TCP server (slave) exposing its Variable Memory (VM) area to a supervisory controller, HMI, or SCADA.
  2. LOGO! 8 as a Modbus TCP client (master) polling remote Modbus TCP servers such as frequency drives, energy meters, or I/O couplers.
  3. LOGO! 8 communicating with RTU field devices through a third-party Modbus RTU-to-TCP converter.

The procedures reference LOGO! 8 System Manual (Siemens Support entry 109751606) and the Siemens Industry Online Support portal for firmware/binary downloads.

LOGO! 8 Hardware and Firmware Compatibility Matrix

The capability to communicate with Modbus TCP/IP is gated by both device generation and firmware status (FS). Verify the exact FS designation printed on the side of the module or read it from the diagnostics web page before commissioning.

Device Order Number Examples Firmware Status LOGO!Soft Comfort Required Modbus TCP/IP Modbus RTU (RS-485)
LOGO! 8.1 Standard 6ED1052-1xxx08-0BA0 FS01 - FS03 V8.0 or earlier Not supported Not supported
LOGO! 8.1 Standard 6ED1052-1xxx08-0BA1 FS04 - FS06 V8.1.0 minimum Yes (client + server) Not supported (use gateway)
LOGO! 8.2 Standard 6ED1052-1xx08-0BA2 FS01 V8.2.0 minimum Yes (client + server) Not supported (use gateway)
LOGO! 8.3 Standard 6ED1052-1xx08-0BA3 FS01+ V8.3.x or newer Yes (client + server) Not supported (use gateway)
LOGO! 8 Pure 6ED1052-2xx08-0BA0 All FS Same as base Same as base Same as base
Critical: No LOGO! 0BA8 variant has a native Modbus RTU master or slave implementation on the CM/CMK AS-i or RS-485 expansion. Serial Modbus RTU traffic on the RJ45/RS-232 service port is also disabled. The only Modbus transport available is TCP/IP over the integrated Ethernet interface.

Prerequisites

Before starting, confirm the following hardware and software stack:

  • LOGO! 8 base module with firmware status FS04 (8.1) or FS01 (8.2) or later. Read the FS code from LOGO! > Diagnostics > Product Information on the device or from the device's built-in web server (default IP 192.168.0.1, user LOGO, password LOGO).
  • LOGO!Soft Comfort (LSC) V8.1.0 minimum for 8.1 hardware, V8.2.0 minimum for 8.2 hardware. Siemens publishes free updates on the Siemens Industry Online Support portal under entry ID 109751606 (LOGO! 8 system manual) and the LOGO! Soft Comfort product page. Always install the matching service pack before commissioning.
  • Ethernet switch (100 Mbit/s minimum) and Cat5e/Cat6 cabling terminated to TIA-568B.
  • Static IP plan — LOGO! 8 does not support DHCP on its Ethernet port by default; reserve a unique IPv4 address plus the supervisory controller IP.
  • For RTU integration: a Modbus RTU-to-TCP gateway such as Wago 750-362, Moxa MGate MB3170, or Anybus X-gateway with a documented register-mapping configuration tool.
  • PC running LSC and an Modbus TCP client test utility (Siemens recommends Modbus Poll, QModMaster, or diagslave) for verification.

Network Architecture

LOGO! 8 occupies one Ethernet port and accepts up to 8 concurrent Modbus TCP/IP connections combined with up to 8 S7 connections. A typical topology is shown below.

+----------------------+         +-------------------------+
|   SCADA / HMI / PLC  |  TCP    |  Ethernet Switch        |
|   Modbus TCP Client  +---------+  (192.168.0.0/24)      |
+----------------------+         +----+----------------+--+
                                      |                |
                                      |                |
                              +-------+----+   +-------+----+
                              | LOGO! 8   |   | LOGO! 8    |
                              | .10 (srv) |   | .11 (cli)  |
                              +-----+-----+   +-----+------+
                                    |                |
                                    |                | (gateway traffic)
                              +-----+------+  +------+-------------+
                              | Expansion  |  | RTU/TCP gateway    |
                              | DM8 / AM2  |  | e.g. Wago 750-362 |
                              +------------+  +-------+-----------+
                                                   | RS-485 (A/B/GND)
                                              +----+--------+
                                              | VFD / Meter|
                                              +-------------+

Recommended port assignments:

Service Port Notes
LOGO! Web server 80 / 443 (8.2+) Diagnostics only; disable in production if not needed.
S7 communication 102 (TCP) Reserved for TIA Portal / LOGO!Soft Comfort.
Modbus TCP/IP 502 (TCP) Standard IANA-registered Modbus port.
NTP (8.2+) 123 (UDP) Optional time synchronization.

Configuring LOGO!Soft Comfort for Modbus TCP/IP

1. Set the LOGO! IP Address

  1. Open LOGO!Soft Comfort, choose Tools → Ethernet Connections.
  2. Click Add Server Connection. The dialog exposes the LOGO!'s IP and a read-only view of currently configured connections.
  3. For online configuration, connect the PC to the LOGO! via the same switch. From Tools → Transfer → Ethernet → Set Ethernet Address enter a free static IP, e.g. 192.168.0.10, subnet 255.255.255.0, gateway 192.168.0.254.
  4. Click Apply to LOGO!. The device reboots (about 10 s) and responds on the new address.
Watchdog: Changing the IP does NOT clear the user program; however, the LOGO! stops execution for the duration of the reboot. Plan the change for an outage window.

2. Enable the Modbus Server (LOGO! as Slave)

Starting with firmware 8.1 / LSC 8.1, Modbus TCP server functionality is enabled by default and requires no additional activation bit. The server exposes the LOGO!'s Variable Memory (VM) area as holding registers, input registers, coils, and discrete inputs. The address mapping is fixed by Siemens and cannot be remapped:

Modbus Address Space LOGO! Memory Region Size Modbus Function Codes
Coils (0x) VM byte bits 0-855 6848 bits 01 (Read), 05 (Write Single), 15 (Write Multiple)
Discrete Inputs (1x) Read-only mirror 6848 bits 02 (Read)
Input Registers (3x) VM words 0-847 848 registers 04 (Read)
Holding Registers (4x) VM words 0-847 848 registers 03 (Read), 06 (Write Single), 16 (Write Multiple)

The VM area is the same memory that LSC programs address symbolically with the Network Input/Output, Analog Flag, Shift Register, and Open Connector blocks. Each boolean VM bit maps 1:1 to a Modbus coil; each 16-bit VM word maps 1:1 to a Modbus register.

3. Add a Modbus Client Connection (LOGO! as Master)

LOGO! 8 can act as a Modbus TCP client to poll up to 8 remote servers. The configuration is done in the LSC diagram editor using the Network Analog Input (NAI) and Network Digital Input (NDI) function blocks, or via the Modbus Master table introduced in LSC 8.2.

  1. Place an NAI block on the FBD diagram (drag from the toolbar → SpecialNetwork Analog Input).
  2. Double-click to open the configuration dialog.
  3. Set IP address to the remote Modbus server, e.g. 192.168.0.50.
  4. Set Port to 502.
  5. Choose Read Holding Register (FC03) or Read Input Register (FC04).
  6. Set Starting Register, Number of Registers, and the Sample Time (minimum 100 ms).
  7. Map the read value to an Analog Flag or VM word by assigning the block's output Q connector.

For boolean reads, use the NDI block with function code 01 (Read Coils) or 02 (Read Discrete Inputs). Writes back to the remote server are supported by the NAQ (Network Analog Output) and NDQ (Network Digital Output) blocks using FC05, FC06, FC15, or FC16.

4. Register Mapping Table

Below is a worked example mapping three drive parameters (frequency, current, status word) from a hypothetical VFD with Modbus TCP support into LOGO! memory.

Modbus Register (4x) LOGO! Block LOGO! Symbol VFD Parameter Data Type
40001 NAI 1 (Q) VM0 Output Frequency (Hz × 10) INT16
40002 NAI 2 (Q) VM1 Motor Current (A × 10) INT16
40003 NDI 1 (Q) VM2.0 Run/Stop status bit BOOL
40010 (write) NAQ 1 (Source) VM10 Frequency Setpoint (Hz × 10) INT16
00011 (write) NDQ 1 (Source) VM2.1 Start Command BOOL

Sample LSC analog scaling in the diagram:

[ NAI 1 ] -- Q --> [ Analog Gain (÷10) ] -- Q --> [ Display ]

The Analog Gain block converts the Modbus INT16 scaled value (e.g. 500 for 50.0 Hz) into the engineering unit expected by the LOGO! program.

Using Modbus RTU-to-TCP Gateways

Because no LOGO! 0BA8 module can speak Modbus RTU natively, integrating RS-485 field devices requires an external gateway that converts TCP requests on its Ethernet side to RTU frames on its RS-485 side. The LOGO! simply sees another Modbus TCP server on the LAN.

Topology

LOGO! 8 (Modbus TCP client, 192.168.0.10)
        |
        | TCP/IP : 502
        v
+--------------------------+
|  Modbus RTU/TCP Gateway  |  IP: 192.168.0.50
|  e.g. Wago 750-362       |
+--------------------------+
        |
        | RS-485 (A+/B-/GND)
        v
+-------+-------+-------+
| VFD 1| VFD 2 | Meter |
| ID 1 | ID 2  | ID 3  |
+-------+-------+-------+

Gateway Configuration Checklist

  1. Set the gateway's IP address, subnet mask, and default gateway so it is reachable from the LOGO! subnet.
  2. Configure the RS-485 side: baud rate (e.g. 19200), parity (typically Even for Modbus), data bits (8), stop bits (1).
  3. Map each downstream RTU slave (by Modbus unit ID 1-247) to a virtual TCP server or to a register offset accessible by the LOGO! client. Some gateways auto-forward with the same slave ID via the TCP request's Unit Identifier field (Modbus exception code 0x0A is used to mark gateway routing in MBAP); others require a static mapping table.
  4. Set request timeout to ≥ 1000 ms for RTU; LOGO! NAI/NDI sample time must be greater than the gateway turnaround.
Common pitfall: Many low-cost RTU-to-TCP converters swallow the Modbus Unit Identifier byte and broadcast requests to all slaves. Confirm with a Modbus sniffer (e.g. Wireshark with the modbus dissector, port 502) that the gateway forwards the original unit ID. Otherwise the LOGO! cannot distinguish multiple slaves on the RS-485 trunk.

Verification and Diagnostics

  1. Web server diagnostics: Open http://192.168.0.10 in a browser. The home page shows the active IP, firmware FS code, and the number of currently open Modbus TCP connections.
  2. LOGO!Soft Comfort online test: From the menu, choose Tools → Ethernet Connections. The dialog lists active S7 and Modbus sessions with the partner IP and connection state. A green check indicates an established session.
  3. External Modbus master: Use QModMaster or Modbus Poll to read VM0 (register 40001). The raw value should match the LOGO! program state. For example, if the LOGO! digital input I1 is HIGH and the program writes I1 -> VM0.0, then coil 0x0001 should read 1.
  4. Wireshark capture: Capture on port 502 with filter modbus. Verify the transaction ID increments, the protocol ID is 0, the length field matches the payload, and the unit ID is correctly forwarded.
  5. Read VM memory block statistics: In LSC online mode, place a Cursor on the VM connector. The status line shows the current value and the number of successful Modbus reads since last power-up.

Troubleshooting Matrix

Symptom Likely Cause Corrective Action
LOGO!Soft Comfort reports "Device not reachable" over Ethernet Wrong IP, FS01-FS03 hardware, firewall on PC Ping LOGO! IP. Confirm FS code is ≥ FS04. Add firewall rule for TCP 102 and 502.
Modbus client tool gets no response on port 502 Modbus server disabled by custom firmware, or wrong device IP Verify LOGO! web server reachable. Default Modbus server is always on; do not write to internal configuration flags.
Reads return Modbus exception 02 (Illegal Data Address) Requested address > 855 for coils / > 847 for registers Reduce request length. Address space is fixed by Siemens and cannot be extended.
Reads return exception 03 (Illegal Data Value) Function code not supported (e.g. FC07, FC08, FC20, FC23) LOGO! 8 supports FC01, 02, 03, 04, 05, 06, 15, 16 only. Confirm client uses one of these.
NAI block shows error bit, value = 0 Timeout / unreachable server Increase Sample Time. Verify gateway responds with diagslave on the same IP and port before testing from LOGO!.
Values flicker or repeat old data Two clients polling same registers at different rates LOGO! internally caches the last good response. If a second master writes the same register, both see race conditions; partition read/write addresses.
LSC transfer fails with "Firmware mismatch" Project created with newer LSC than LOGO! firmware Upgrade LOGO! firmware via the LSC Tools → Firmware Update wizard, or downgrade the project in LSC.
Gateway responds but LOGO! reads stale data Gateway not forwarding Unit ID, slave collision on RTU bus Reconfigure gateway Unit ID mode to Transparent. Ensure unique slave IDs on the RS-485 trunk.

Field-Proven Tips and Edge Cases

  • Power budget: Modbus polling is single-threaded on the LOGO!. A long NAI poll (>100 registers) blocks other clients for the duration of the request. Keep poll lists short and use multiple smaller NAI blocks rather than one large one.
  • Endianness: LOGO! stores VM words in big-endian on the wire (Modbus standard), but LSC's analog flag blocks interpret them as signed INT16 in the program's native byte order. No swap is required for single-register values. For 32-bit floats you must use two consecutive registers and apply a Math block to combine them.
  • Write protection: LSC V8.2+ allows password-protected access to Modbus writes. If the client receives exception 04 (Slave Device Failure) on writes, the LOGO! program may have its password set with "Allow Modbus Write = No" in the project properties.
  • Watchdog on client blocks: If the remote Modbus server disappears, the NAI block's output stays at the last good value. To detect loss, route a Network Status digital into the program and assert an alarm bit when the status flips to ERROR.
  • Cybersecurity: LOGO! 8 has no built-in Modbus user authentication. Place the controller behind a firewall or VPN if exposed to an untrusted network. Disable the web server when not in use to reduce the attack surface.
  • Firmware upgrade path: When upgrading from 8.1 to 8.2 in the field, plan a download of approximately 8 MB and a reboot of about 30 s. The project is preserved, but Modbus connection IDs may need to be re-saved if the project is round-tripped through LSC V8.2 from V8.1.

Sample Commissioning Workflow

  1. Update LOGO! firmware to the latest FS via LSC Tools → Firmware Update. Confirm FS code via web page.
  2. Update LOGO!Soft Comfort to the latest service pack and rebuild the project against the new libraries.
  3. Set static IP on LOGO! and verify ping from engineering PC.
  4. Insert NAI blocks for each remote parameter. Configure IP, port 502, FC03/04, sample time 250 ms.
  5. Insert NAQ/NDQ blocks for writes. Mark all VM source addresses as non-overlapping with NAI destinations.
  6. Compile and download the project via Ethernet.
  7. Run QModMaster against the LOGO! IP. Read coils 0-15 and holding registers 0-15. Cross-check against the LSC online Cursor display.
  8. If RTU slaves are involved, repeat the above against the gateway IP and verify Unit ID transparency.
  9. Document the final register map (IP, port, function code, address, engineering unit) and back up the LSC project to the plant network share.

Standards and Reference Documentation

  • Modbus Organization: Modbus Application Protocol V1.1b3 and Modbus TCP/IP V1.0b — refer to the Modbus Organization for the wire-format specification.
  • Siemens LOGO! 8 System Manual — chapter on Ethernet communication and Modbus device integration, available as Siemens Support entry 109751606.
  • LOGO! Product Page: Siemens LOGO! Logic Module overview with order numbers and firmware history.
  • LOGO!Soft Comfort Download: Available from the Siemens Industry Online Support portal under the LOGO! product tree. A free of charge license unlocks the full feature set including Modbus client configuration.

Which LOGO! 8 firmware status first supports Modbus TCP/IP?

Modbus TCP/IP support begins with LOGO! 8.1 standard modules at firmware status FS04 and requires LOGO!Soft Comfort V8.1.0 minimum. Earlier 0BA8 units (FS01-FS03) cannot communicate via Modbus and must be replaced or used with a LOGO! CMR/CMK router as a non-Modbus device.

Can LOGO! 8 talk Modbus RTU directly on the RS-485 port?

No. No LOGO! 0BA8 hardware provides native Modbus RTU master or slave capability on the RS-485 expansion port or the CM/CMK AS-i line. To integrate RTU field devices you must use an external Modbus RTU-to-TCP gateway such as the Wago 750-362 or Moxa MB3170, and configure the LOGO! as a Modbus TCP client pointing at the gateway's IP.

What is the maximum number of Modbus TCP connections to a LOGO! 8?

A LOGO! 8 base module accepts up to 8 concurrent Modbus TCP sessions combined with up to 8 S7 sessions. The Modbus server socket on port 502 is always enabled when the FS code is FS04 (8.1), FS01 (8.2), or later. Connection attempts beyond the limit are refused with a TCP RST.

How do I map a Modbus holding register to a LOGO! variable?

Use the Network Analog Input (NAI) block to read a holding register (FC03) or input register (FC04) from a remote server. The output of the NAI block can be wired directly to any LOGO! analog flag, arithmetic block, or VM word. The VM words are also exposed as Modbus holding registers 40001-40848 to any external client, creating a fully bidirectional mirror.

Does LOGO!Soft Comfort V8.1.1 work with LOGO! 8 FS04 modules?

Yes. LOGO!Soft Comfort V8.1.1 is fully compatible with LOGO! 8 base modules at firmware status FS04 through FS06. For newer 8.2 (FS01) hardware, upgrade LOGO!Soft Comfort to V8.2.0 or newer so that the project editor knows the latest function blocks and the firmware download tool matches the bootloader on the device.

Back to blog