IMDHMIControls LibraryShop main store

How-to

Connecting Modbus RTU devices to a LOGO! 8 controller

Industrial networks Published 9 min read By IMDHMI controls team

Short answer

No, a LOGO! 8 with 0BA8 hardware has no Modbus support of its own: its Ethernet port exchanges S7-200-protocol messages over TCP/IP and nothing else. Connect Modbus RTU devices through a protocol gateway that runs an S7-200-compatible client toward the LOGO! and a Modbus RTU master toward the field devices, then budget the gateway's poll period into your data age.

On this page
  1. What the LOGO! 8 Ethernet port actually speaks
  2. Choosing the gateway
  3. Wiring and matching the serial side
  4. Setting the addresses and the S7 link
  5. Mapping registers without reading the wrong one
  6. Worked example: data age of a 10-register meter poll at 9600 baud
  7. Commissioning steps
  8. The decision for each case
  9. Questions asked

No. A LOGO! 8 with 0BA8 hardware has no Modbus of its own: its Ethernet port exchanges S7-200-protocol messages over TCP/IP, and there is no serial Modbus RTU master hiding behind it. The connection is made by a protocol gateway in between - an S7-200-compatible client on the Ethernet side toward the LOGO!, a Modbus RTU master on the serial side toward the device. Nothing weaker works: a plain Ethernet-to-serial adapter only moves bytes and never builds Modbus frames out of S7 requests, and a Modbus TCP-to-RTU gateway waits for Modbus TCP that this controller never sends. The steps below cover choosing that gateway, wiring and matching both sides, mapping registers, and what the extra hop does to your data age.

What the LOGO! 8 Ethernet port actually speaks #

TCP/IP decides only how bytes travel; the application protocol on top decides what they mean. On the 0BA8 that application protocol is the S7-200 protocol - the LOGO! serves its data to an S7 client, and it does not implement Modbus TCP or Modbus RTU. That is why a live link or a successful ping proves nothing here: a Modbus TCP client can open a TCP session to the LOGO! and still never complete a transaction, because the payloads it sends mean nothing to an S7 server.

Treat the LOGO! as an S7-200-compatible endpoint and you have the specification for the other half of the problem: whatever sits between the LOGO! and the meter must be documented to speak the S7-200 protocol as a client, not just carry a generic S7-compatible label. Read the designation off your module and use the system manual for that hardware series - the communication set is defined per series and firmware, and the gateway you buy depends on it.

Choosing the gateway #

A protocol gateway interprets a message on one connection and constructs a different message on the other; a transparent serial server just pipes bytes. Only the first kind solves this connection. Three requirements decide the purchase:

Gateway requirement What to verify before you buy
S7-200-compatible client on Ethernet The vendor's compatibility table names LOGO! or S7-200-style server access explicitly, not a generic S7 label
Modbus RTU master on serial Function codes 03 and 04 for reads, 06 and 16 for writes, plus the electrical interface your device uses
Communication-status object A register or bit the LOGO! can read that changes when the RTU device stops answering

Then choose the architecture. Most gateways poll the RTU device on a fixed period, cache the values and serve the LOGO! from the cache; others translate each controller request into a serial transaction on demand. The polled kind gives you a deterministic data age, which is what the worked example below budgets. Whichever you pick, the status object is not optional: without it, a stopped meter looks like a live zero on the LOGO!.

The pattern is the same one behind why a legacy serial PLC needs a gateway for Modbus RTU: the controller's native protocol on one side, a Modbus RTU master on the other.

Wiring and matching the serial side #

Modbus RTU devices with an RS485 port form a two-wire, half-duplex daisy chain: each device taps the chain with a short stub, and a termination resistor equal to the cable's characteristic impedance - 120 ohms for the usual twisted pair - closes both ends. Signal names vary between vendors, so take the terminal definitions from the device manual rather than matching letters.

Then match the serial format. The Modbus RTU default is 9600 baud, 8 data bits, even parity, 1 stop bit, but read the actual settings from the device's parameter list or DIP switches instead of assuming them. Set the slave address to whatever the device is configured for; addresses run from 1 to 247 and must be unique on the segment. A wrong address or parity gives complete silence, and a marginal connection gives framing errors that the gateway's serial diagnostics will show during a poll.

Give the LOGO!'s Ethernet port and the gateway's Ethernet port addresses on one subnet - for example, LOGO! at 192.168.0.2, gateway at 192.168.0.10, mask 255.255.255.0. In the gateway, configure its S7-200-compatible client to address the LOGO!'s IP as the remote partner, and map the gateway's internal registers onto the data area the LOGO! exposes for S7 exchange, as the LOGO! system manual for your series defines it.

The checkpoint most people skip: an established TCP link is not an established S7 connection. The commissioning proof is the gateway reporting its S7 partner online and the first value actually moving. If it stays silent at this point, the failure modes are the family described in why an S7-1200 Modbus TCP client shows no data through a gateway - partner not configured, data area not mapped, wrong partner type - with the cure sitting in the gateway's S7 client settings rather than a Modbus client's.

Mapping registers without reading the wrong one #

Take the register map from the device manual and record, for every value you need: the reference, the access direction, the data type, the unit and the scaling. Two traps sit here.

First, the addressing convention. A manual that prints 40001-style references is naming registers under a convention, while the request on the wire carries a zero-based offset - and some configuration tools want the reference, others the offset. Being off by one returns a perfectly valid frame holding the neighbouring register, which is harder to catch than silence because the number looks plausible.

Second, the data interpretation. Values wider than 16 bits span two registers whose word order depends on the device, and integers can be signed or unsigned, so check every mapping against a value you can verify at the device itself - its display, or a known test input. A mapped value that disagrees with the device while the link counters look healthy is a mapping fault, not a link fault; what a gateway can map from DF1 serial to Modbus TCP draws the same line for another protocol pair.

One safety note: keep every write disabled in the gateway until the read map is proven against the device, then enable writes one register at a time - a write aimed at the wrong register can start, stop or reset equipment.

Worked example: data age of a 10-register meter poll at 9600 baud #

The inputs:

  • 10 holding registers hold everything the LOGO! needs from the meter - a typical main block for a small power meter, and the example's own input.
  • Serial format 9600 baud with even parity, the Modbus RTU default, which puts 11 bits on the wire per character: 1 start, 8 data, 1 parity, 1 stop.
  • Poll period set in the gateway: 250 ms, chosen for this example.
  • One read of the whole block with function code 03, read holding registers.

The rule in words: wire time per poll is characters times bits per character, divided by the baud rate, plus the silent interval of 3.5 character times that Modbus RTU requires before and after each frame. The worst-case age of a value at the LOGO! is one poll period plus that poll's wire time, plus one gateway-to-controller transfer.

The arithmetic:

  • Character time: 11 bits / 9600 bits per second = 1.146 ms.
  • Function 03 request: 1 + 1 + 2 + 2 + 2 = 8 bytes (address, function, start reference, count, CRC). Response: 1 + 1 + 1 + (2 x 10) + 2 = 25 bytes. Total 33 characters, so 33 x 1.146 ms = 37.8 ms.
  • Silence around the frames: 2 x 3.5 x 1.146 ms = 8.0 ms.
  • Poll cost: 37.8 + 8.0 = 45.8 ms of wire time per poll.
  • Segment occupancy: 45.8 / 250 = 18 percent of the period.
  • Data age at the LOGO!: 250 ms + 46 ms = about 300 ms, plus one short gateway transfer and one controller scan on top.

The result: one poll of the full block costs about 46 ms and fills 18 percent of the 250 ms period, and the LOGO! sees a change roughly 0.3 s after it happens.

The decision: logic that tolerates 0.3 s of age - energy totals, trends, staging, slow alarms - fits with room to add more meters on the segment. Logic that must react in under 200 ms does not fit this path. If a faster serial rate and a shorter period re-run through the same arithmetic meet that threshold, raise them; otherwise move that measurement to a controller with a native Modbus RTU master port.

Commissioning steps #

  1. Read the designation and firmware off the module and open the system manual for that series; confirm the Ethernet port's protocol set - on 0BA8, S7-200 protocol over TCP/IP, no Modbus.
  2. Put the LOGO! and the gateway on one subnet and fix their IP addresses; the gateway is the S7 client, the LOGO! serves.
  3. Configure the gateway's S7-200-compatible client against the LOGO!'s IP and its server data area; do not move on until the gateway reports that partner online.
  4. Wire the RS485 chain: devices daisy-chained, stubs short, a 120 ohm terminator at each end of the chain.
  5. Match the slave address and serial format to the device's own configuration - read them off the device rather than assuming defaults.
  6. Map the registers, one read-only value first, recording direction, data type, unit and scaling beside each entry.
  7. Prove the map: compare the LOGO!'s value with the value shown at the device itself, then change the physical quantity and confirm the number moves the right way in the right units.
  8. Enable writes one register at a time and check each readback before enabling the next.
  9. Test the failure path: stop the meter or pull its serial connection and confirm the gateway's status object changes and the LOGO!'s logic reacts as intended.

The decision for each case #

  • LOGO! 8 0BA8 with Modbus RTU devices, and 0.3 s of data age is acceptable: connect through the gateway described here - S7-200-compatible client to the LOGO!, Modbus RTU master to the devices - and carry the worked example's age budget into every timer and alarm you write on the LOGO!.
  • The logic must react faster than 200 ms: a polled gateway cannot honestly deliver it; put that loop on a controller whose CPU speaks Modbus RTU natively on a serial port and let the LOGO! keep the slow values.
  • The field devices are Modbus TCP instead of RTU: the LOGO!'s Ethernet port still speaks S7 only, so the same gateway architecture applies with Modbus TCP on the field side rather than a serial port.

Questions asked

Does a LOGO! 8 support Modbus TCP natively?

On the 0BA8 hardware this article covers, no. The Ethernet port answers S7-200-protocol requests over TCP/IP and does not implement the Modbus TCP application protocol, so a Modbus TCP device also needs conversion. A gateway that pairs the same S7-200-compatible client with a Modbus TCP connection on the field side instead of a serial port solves it the same way.

Can the LOGO! write values out to the Modbus RTU device?

Yes, if two things hold. The gateway must support mapping in the write direction, from S7 writes to Modbus function codes 06 and 16, and the field device must accept writes on those registers. Keep writes disabled in the gateway until the read map is proven, then enable one register at a time and check the device's readback after each.

How many Modbus RTU devices can share the serial segment with the gateway?

Modbus RTU slave addresses run from 1 to 247, so up to 247 devices are addressable. The physical segment is the tighter limit: a classic RS-485 segment carries 32 unit loads before repeaters are needed. Time matters too, because each device's poll adds its own wire time to the gateway's poll period, as the worked example shows.

I have a different LOGO! generation - does the same answer apply?

Not automatically. The protocol set on the Ethernet port depends on the exact hardware series and firmware, so read the designation stamped on the module and use the system manual for that series before you fix the gateway's controller-side protocol. The 0BA8 unit described here speaks the S7-200 protocol only; other generations can differ.

Keep reading

  • How-to

    S7-200 Port 0 Modbus RTU wiring: pins 3, 8, termination

    Connect each counter's two-wire RS-485 pair to S7-200 Port 0 DB9 pins 3 and 8. Matching terminal letters is unreliable, so confirm polarity with a poll-and-reverse test. Fit one 120 ohm termination resistor at each of the two physical ends of the trunk and none at intermediate devices.

    Industrial networks

  • Explainer

    Why an RS-485 device that lacks Modbus RTU stays silent

    RS-485 sets voltage levels and wiring, not message content. A meter that only speaks its native protocol never answers a Modbus RTU request, and no change of baud rate, parity, address or termination changes that. Either program the native protocol in the PLC or place a documented dual-protocol gateway with an explicit register map; expect silence, not an error code, as the symptom.

    Industrial networks

  • How-to

    How an S7-1200 reads PAC3200 floats over Modbus RTU

    MB_MASTER takes register references, not the meter's offsets: DATA_ADDR is 40001 plus the offset, so offset 1 for the Va-n voltage becomes 40002, and DATA_LEN counts registers, so one 32-bit float needs a length of 2. The meter sends the high word first, which is already REAL order in S7-1200 memory, so the pair decodes with no swap.

    Industrial networks