Configuring ET200S IM151-8 PN/DP for Modbus TCP to Remote RTU

David Krause22 min read
Industrial NetworkingSiemensTutorial / 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

1. Application Scenario Overview

This document is a field reference for integrators who must connect a SIMATIC ET200S distributed controller — head module CPU IM151-8 PN/DP (PROFINET IO controller with integrated PROFINET interface) — to a third-party Remote Terminal Unit, typically a Schneider Electric SCADAPack, Trio, or similar water-utility RTU, using the Modbus protocol. The physical path between the two devices is approximately 3 km, well beyond the 100 m copper-Ethernet limit, so the link is carried by either fibre-optic cable or by industrial Ethernet radio (point-to-point bridge).

Two Modbus variants are candidates for the link:

  • Modbus TCP/IP — preferred for new deployments. Modbus TCP rides on standard TCP port 502, needs no special hardware on the ET200S side beyond the onboard PROFINET interface, and is implemented in the CPU by loading the S7 OpenModbus/TCP library (Siemens article number 2XV9 450-1MB02).
  • Modbus RTU over RS-485 — possible if a CM PtP (point-to-point) communications module is inserted into the ET200S station. RS-485 is limited to roughly 1200 m at 9.6 kbit/s and therefore is a poor fit for a 3 km link. The user would also need a serial-to-Ethernet or serial-to-radio converter on the RTU side, adding another point of failure.

For a 3 km separation with native Ethernet on both ends, the recommended solution is Modbus TCP/IP over industrial radio: a pair of outdoor Ethernet-to-radio bridge radios that present a transparent Layer-2 Ethernet service to the two end devices. The ET200S CPU runs the OpenModbus/TCP blocks and exchanges registers with the RTU exactly as if the RTU were on the same switch as the CPU.

2. ET200S IM151-8 PN/DP Hardware Reference

The head module used in the reference application is the IM151-8 PN/DP, a SIMATIC ET200S CPU that combines the function of a PROFINET IO controller and a PROFIBUS-DP master with the footprint of an ET200S station. Two principal variants exist:

Order number (MLFB) Designation Onboard PROFINET ports Other onboard interfaces
6ES7 151-8AB01-0AB0 IM151-8 PN/DP Port X1 (RJ45), Port X2 (RJ45) RS-485 for PROFIBUS-DP / MPI
6ES7 151-8FB01-0AB0 IM151-8 PN/DP FO Port X1 (RJ45), Port X2 (PROFINET fibre SC-RJ) RS-485 for PROFIBUS-DP / MPI

For the OpenModbus/TCP library to load and execute, the CPU firmware must be at least V2.0; firmware V3.x or newer is strongly recommended and is required for some of the function-block enhancements shipped with the 2XV9 450-1MB02 package. Firmware updates are performed using the SIMATIC Automation Tool or by writing the firmware file to a SIMATIC SD card. Firmware files are published on the Siemens Industry Online Support portal.

The two PROFINET ports are independent interfaces. By default:

  • Port X1 hosts the PROFINET IO network — the link to the engineering station, the HMI panel, and the head-station backplane traffic that drives the ET200S I/O modules.
  • Port X2 can be assigned a separate IP subnet, giving the CPU a second IP address and a second MAC address. X2 is the natural choice for the Modbus TCP traffic because the PROFINET IO real-time traffic on X1 is not disturbed, and the routing rules for the Modbus segments remain simple.

If the HMI is on PROFINET and shares the IO subnet, X1 can still host the HMI panel on the same subnet as PROFINET IO. In single-port installations the CPU can also host Modbus TCP on X1, but the IO update budget should be verified because each Modbus connection consumes cyclic interrupt time and TCP socket resources.

3. Communication-Path Selection: Modbus TCP vs Modbus RTU

For a 3 km link, the design decision between Modbus TCP and Modbus RTU is driven primarily by distance, by the I/O count that must be exposed to the RTU, and by the licensing of the OpenModbus/TCP library. The following table summarises the trade-offs:

Criterion Modbus TCP/IP Modbus RTU over RS-485
Physical media supported on the ET200S Built-in PROFINET port (X1 or X2) CM PtP module (for example 6ES7 137-6AA00-0BA0 in ET200S, or the ET200BL CM PtP 6ES7137-8BA00-0AB0 in similar product lines)
Native cable range 100 m copper, 4 km multimode fibre, 40–80 km single-mode fibre 1200 m at 9.6 kbit/s, 800 m at 115.2 kbit/s
Recommended for 3 km link Yes — copper + radio bridge, or direct fibre No — would require additional serial-to-Ethernet converter on the RTU side
TCP/UDP ports TCP 502 (default) N/A — serial
Library / software 2XV9 450-1MB02 (S7 OpenModbus/TCP), licensed Modbus RTU blocks shipped with STEP 7 / TIA Portal library for the CM PtP
Function codes typically used FC 1, 2, 3, 4, 5, 6, 15, 16, 23 FC 1, 2, 3, 4, 5, 6, 15, 16, 23
Determinism of cyclic poll Application-driven (OB1 / OB35) Application-driven (OB1 / OB35)

For a water-utility station where the RTU is a Schneider Electric SCADAPack, the RTU almost always speaks Modbus TCP natively, which removes the serial converter from the bill of materials. The conclusion is that Modbus TCP/IP is the correct choice.

4. S7 OpenModbus/TCP Library (2XV9 450-1MB02)

The S7 OpenModbus/TCP library is the Siemens-supplied function-block set that allows an S7-300, S7-400, WinAC, or ET200S CPU with a PROFINET/PN-IO interface to act as a Modbus TCP client (master) or server (slave). The library is sold separately under article number 2XV9 450-1MB02 and is shipped on a DVD along with a PDF manual, a demo project, and a license-key generator.

The package contains the following function blocks, used according to the role of the ET200S in the exchange:

Function block Role Function
MB_CPCLI Client (master) Opens a TCP connection to a Modbus server, sends a request, and reports the response or error.
MB_CPSRV Server (slave) Listens on TCP 502, accepts the connection from a Modbus client, parses the request, and writes/reads the configured data area.
MB_RED_CLIENT Redundant client Holds two parallel client instances for redundant server connections.
MB_RED_SERVER Redundant server Allows the same DB to be served through two independent connections.
MB_SENDMSG Helper Builds the Modbus PDU for client requests and sends it on a free connection.
MB_RECVMSG Helper Receives the Modbus PDU on a server connection and dispatches it to the holding/input image.
MB_DB_OPEN Helper Initialises the Modbus data image in the configured DB on the first scan.

For the reference deployment, the ET200S is the Modbus server (slave) and the Schneider RTU is the Modbus client (master). The required blocks are MB_CPSRV and MB_DB_OPEN from the S7 OpenModbus/TCP library; MB_CPCLI and the helper blocks are not needed on the ET200S in this role.

Documentation for the library is bundled inside the installation package and is also available on the Siemens Industry Online Support pages indexed by the article number 2XV9 450-1MB02.

5. Licensing, the Reg_Key Input, and the Demo Version

When the OpenModbus/TCP blocks are inserted into the S7 program, each block exposes a REG_KEY input (sometimes also shown as LIC_KEY depending on the block version). The REG_KEY input is a 16-byte STRING (CHAR) constant that contains the registration key purchased with the library. The S7 program will refuse to run — the blocks will report a permanent error code at the STATUS output — until a valid key is wired in.

Licensing of the library works as follows:

  • Without a license (free demo): a fully functional demo version is available from the Siemens Support download area. The demo version runs for a limited time (historically 30 minutes, then the connection is dropped) or is limited to a small number of registers. It is intended for engineering and factory acceptance test (FAT) only, not for production.
  • With a purchased license: the customer receives a license certificate with a 16-character alphanumeric key. The key is generated against the CPU's serial number (or against a memory card's serial number for the V3 release), so the license is tied to a specific CPU. The key is pasted into a data word constant in the project and passed to MB_CPSVR.REG_KEY and MB_DB_OPEN.REG_KEY at first scan.
  • Price: the list price is published in the Siemens Industry Mall under article 2XV9 450-1MB02. Pricing is country-specific and is handled by the local Siemens partner; the customer is not expected to discover the price in the Support forum.
Engineering tip: store the registration key in a separate DB (for example DB999 "LICENSE") and reference it symbolically from the FBs. This keeps the key in one place when the project is re-used across multiple stations and makes the FAT/SAT handover paperwork cleaner.

6. Network Topology and Long-Distance Link Options

The IM151-8 PN/DP is, electrically, an Ethernet device. Its copper PROFINET ports are designed for the 100 m twisted-pair segment defined by IEEE 802.3 100BASE-TX. To reach 3 km the integrator has three practical choices, summarised below.

Option Reach Latency Notes
Multimode fibre (50/125 µm, 1300 nm) up to 4 km at 100 Mbit/s negligible (~5 µs/km) Requires a media converter on each end or a switch with an SFP port. ET200S CPU variant 6ES7151-8FB01-0AB0 has an SC-RJ fibre port built in.
Single-mode fibre (9/125 µm, 1310 nm) up to 40–80 km at 100 Mbit/s with appropriate SFPs negligible Recommended for water-utility trunk lines. Industrial switches with single-mode SFPs are readily available.
Licence-free 5 GHz point-to-point radio 1–5 km line-of-sight 1–10 ms typical Industrial radios such as those conforming to IEEE 802.11a/n at 5 GHz. Modbus TCP is tolerant of 10 ms of jitter; the application should be checked for tolerance to radio re-transmits.
Licence-free 900 MHz / 2.4 GHz radio up to 10 km with high-gain antenna 5–20 ms typical Lower bandwidth, but better non-line-of-sight. Suitable for low-data-rate Modbus traffic.

For the 3 km water-utility link the most common choice is a pair of industrial 5 GHz bridge radios mounted on the well-site and the RTU-mast poles. The radio is transparent at Layer 2, so no Modbus or IP configuration on the ET200S changes — the same Modbus register layout works whether the RTU is in the same rack or 3 km away.

RS-485 alternative (for reference only): a Modbus RTU link over RS-485 is limited to 1200 m at 9.6 kbit/s. A 3 km RS-485 link would require one or more RS-485 repeaters, which add another potential point of failure and which are not generally recommended for utility telemetry where the radio path already exists.

7. STEP 7 Classic Configuration Procedure (ET200S as Modbus Server)

The OpenModbus/TCP library installs in STEP 7 V5.5 / V5.6 (the original target environment for the IM151-8 PN/DP) as a standard library that exposes the FBs in the Libraries > OpenModbusTCP section. The following procedure configures the ET200S as a Modbus server.

  1. Install the OpenModbus/TCP library. Run the setup from the 2XV9 450-1MB02 DVD on the engineering station. Confirm that the FBs FB100 "MB_DB_OPEN", FB101 "MB_CPSRV", FB102 "MB_CPCLI", FB103 "MB_SENDMSG" and FB104 "MB_RECVMSG" appear in the library navigator.
  2. Add the ET200S station. In SIMATIC Manager, create a new project and insert an SIMATIC 300 Station. Replace the CPU 300 with the IM151-8 PN/DP (MLFB 6ES7 151-8AB01-0AB0) so that the standard S7-300 program blocks can be used unchanged in the ET200S head station.
  3. Configure the PROFINET interfaces. Open HW Config > Properties > Ethernet Interface on the IM151-8 and assign IP addresses to both ports. Typical values: X1 = 192.168.0.10/24 (PROFINET IO subnet), X2 = 192.168.1.10/24 (Modbus subnet). Enable the IP router between the two interfaces if the RTU is on a different subnet.
  4. Create the Modbus data block. Generate a DB (for example DB200 "MODBUS_IMAGE") of sufficient size to hold the registers to be exposed. The simplest layout is one contiguous array of WORD or INT elements. A water-utility station with 32 digital inputs, 16 digital outputs, 8 analog inputs and 4 analog values will fit in 64 words (128 bytes).
  5. Insert MB_DB_OPEN. Call FB100 in OB100 (warm restart) or OB101 (hot restart). Pass the DB number of the Modbus image, the offset of the holding-register area, the number of holding registers, and the offset and count of the input-register area. Pass the REG_KEY string constant.
  6. Insert MB_CPSRV. Call FB101 in OB1 (or in a cyclic OB such as OB35 if determinism is required). Pass the instance DB, the local IP (0.0.0.0 to accept on any interface, or the IP of port X2), the TCP port (502 decimal), and the REG_KEY.
  7. Map I/O to the Modbus DB. Use the standard S7 mechanisms — direct read/write of the process image, or move instructions driven by the I/O module's PIW/PQW symbols — to keep the process values in the same DB that MB_DB_OPEN has registered with the library. Holding registers (function code 03/06/16) are read-write and are used for setpoints and commands; input registers (function code 04) are read-only and are used for measurements.
  8. Compile, download, run. Save, compile, and download the hardware configuration and the S7 program to the IM151-8. Switch the CPU to RUN-P and check the STATUS outputs of the FBs — they should report 16#0000 after a successful first scan.

8. Function-Block Parameter Reference

The two blocks that are relevant for the ET200S server role are documented below. Names and data types follow the S7 OpenModbus/TCP V3.x manual; earlier versions of the library use slightly different pin names but the same semantics.

8.1 FB100 MB_DB_OPEN

Input / output Declaration Data type Meaning
REQ INPUT BOOL Edge-triggered start. Wire to a one-shot pulse in OB100.
MB_DB INPUT BLOCK_DB Number of the data block that holds the Modbus image.
HR_START INPUT INT Byte offset of the holding-register area inside MB_DB.
HR_COUNT INPUT INT Number of 16-bit holding registers to expose.
IR_START INPUT INT Byte offset of the input-register area inside MB_DB.
IR_COUNT INPUT INT Number of 16-bit input registers to expose.
COIL_START INPUT INT Byte offset of the coil area.
COIL_COUNT INPUT INT Number of coils.
DI_START INPUT INT Byte offset of the discrete-input area.
DI_COUNT INPUT INT Number of discrete inputs.
REG_KEY INPUT STRING[16] 16-byte registration key supplied with the 2XV9 450-1MB02 license.
DONE OUTPUT BOOL Set to TRUE for one cycle on successful completion.
ERROR OUTPUT BOOL Set to TRUE on any error.
STATUS OUTPUT WORD Error/status code. 16#0000 = no error.

8.2 FB101 MB_CPSRV

Input / output Declaration Data type Meaning
REQ INPUT BOOL Edge-triggered start.
MB_DB INPUT BLOCK_DB Number of the Modbus image DB.
LOCAL_IP INPUT STRING Local IP address as a string. Use "0.0.0.0" to accept on any interface, or the IP of port X2 (e.g. "192.168.1.10").
LOCAL_PORT INPUT INT TCP port, decimal. Default 502.
UNIT_ID INPUT BYTE Modbus unit identifier. Use 0xFF for the standard TCP behaviour; use 1–247 if the RTU is bridging to a downstream Modbus RTU link.
CONN_TIMEOUT INPUT TIME TCP open timeout, e.g. T#10s.
REG_KEY INPUT STRING[16] License key, identical to MB_DB_OPEN.
DONE OUTPUT BOOL Set on successful start of the listener.
ERROR OUTPUT BOOL Set on any error.
STATUS OUTPUT WORD Status / error code.
CONN_COUNT OUTPUT INT Number of currently open Modbus TCP connections.

9. Data-Block Design and Modbus Register Mapping

Modbus TCP is register-oriented. The ET200S exposes the data of its data block to the RTU according to the offsets and counts passed to MB_DB_OPEN. The mapping is byte-aligned, big-endian, with the most significant byte at the lower Modbus address. The standard register types and their function codes are:

Modbus area Function code (read) Function code (write) Access Typical use in a water-utility station
Coil (0xxxx) 01 05, 15 Bit, read/write Digital outputs (pump start, valve open)
Discrete input (1xxxx) 02 Bit, read-only Digital inputs (level switch, door open)
Input register (3xxxx) 04 16-bit, read-only Analog measurements (level in mm, flow in l/s, pressure in bar)
Holding register (4xxxx) 03 06, 16, 23 16-bit, read/write Setpoints, modes, totalised values that can be reset by the RTU

A practical layout for the reference station, using a 64-word DB200, is shown below. All offsets are byte offsets inside the DB.

Modbus address Data block offset Type Width Use
00001–00016 0.0–1.7 Coil 16 bits Digital outputs (pump 1 start, pump 2 start, valve 1 open, …)
10001–10032 2.0–5.7 Discrete input 32 bits Digital inputs (high level, low level, pump running, …)
30001–30008 6.0–21 Input register 8 words Analog inputs from the ET200S AI modules (PIW 304, 306, … 318)
40001–40024 22.0–69 Holding register 24 words Setpoints, totalisers, command words, spare

The S7 program keeps the Modbus image in sync with the process image with a small set of move instructions executed in OB35 every 100 ms. For a 32-bit value (e.g. a totaliser in m³), the S7 program writes the high word to DB200.DBW 22 and the low word to DB200.DBW 24. The RTU must then reassemble the 32-bit value in big-endian order on its side, which is the convention used by every Modbus implementation.

10. Schneider RTU Side Configuration

On the Schneider RTU the configuration is symmetric. The RTU is the Modbus client and the ET200S is the server. The fields to be entered in the Schneider configuration tool (for example the SCADAPack Workbench or the ClearSCADA point configuration) are:

  • Slave IP address: 192.168.1.10 (the IP of port X2 on the IM151-8).
  • TCP port: 502.
  • Unit ID / slave address: 1 (or 255 if the RTU is set to use the default 0xFF).
  • Polling interval: 1000 ms for fast measurements, 5000 ms for slow totalisers. Do not poll faster than 200 ms because the radio bridge may queue packets.
  • Timeout and retries: 3000 ms timeout, 3 retries. On a 3 km radio link a single retry is normal during heavy rain or fog.

Most Schneider RTUs default to the standard Modbus register numbering (0xxxx for coils, 1xxxx for discrete inputs, 3xxxx for input registers, 4xxxx for holding registers), which matches the OpenModbus/TCP convention directly.

11. Verification and Commissioning

After the project is downloaded, a five-step verification confirms that the link is healthy end-to-end.

  1. Local link check. From the engineering station, ping the IP of port X2 on the IM151-8. A response confirms the local IP stack is up.
  2. FB status check. With the CPU in RUN, open the OpenModbus/TCP instance DB online and inspect STATUS on MB_DB_OPEN and MB_CPSRV. Both must be 16#0000.
  3. Modbus poll from a PC tool. Use a Windows Modbus master test tool (such as the open-source Modbus Poll or diagslave) to connect to 192.168.1.10:502 and read holding registers 1–24. The values should match the values written by the S7 program.
  4. Radio-link test. Repeat step 3 with the engineering station on the far side of the radio bridge, using the radio's remote-side IP. The same register values must be returned.
  5. End-to-end RTU poll. On the Schneider RTU, force a poll of the same registers. The RTU's internal point database should show the expected values within one polling interval.

12. Diagnostics and Troubleshooting Matrix

Symptom Likely root cause Diagnostic step Remediation
MB_CPSRV.STATUS = 16#8xxx, server does not start TCP port 502 already in use, or wrong LOCAL_IP string format Open NetPro and confirm only one MB_CPSRV instance is bound to port 502. Inspect the LOCAL_IP string in the FB instance DB. Change the LOCAL_IP to "0.0.0.0" or to the exact IP of X2. Stop the conflicting service.
MB_CPSRV.STATUS = 16#F001, license error Invalid or missing REG_KEY Compare the REG_KEY string with the certificate supplied with 2XV9 450-1MB02. Confirm the key is registered against the actual CPU serial number. Re-enter the key, or request a new key from the local Siemens partner if the CPU was replaced.
Server starts but no connection from the RTU Firewall on the radio, wrong IP, wrong port, no PROFINET subnet route From a PC on the radio far side, run telnet 192.168.1.10 502; a black screen confirms TCP is open. Open port 502 in the radio's firewall. Add a static route in the IM151-8 routing table so that traffic for 192.168.1.0/24 leaves on X2.
Connection opens but every read returns exception code 02 (illegal data address) Modbus address outside the area declared in MB_DB_OPEN Check HR_START, HR_COUNT, IR_START, IR_COUNT against the RTU poll list. Resize the Modbus DB and re-enter HR_START / HR_COUNT in the FB.
Reads work, writes (FC 06, 16) return exception 04 (server device failure) RTU is writing to an address declared as input register (read-only) Cross-check the address map against the area declarations. Move writeable setpoints into the holding-register area; do not place them in the input-register area.
Intermittent timeouts, especially in rain Radio signal margin too low; antenna alignment off; interference Check the radio's received signal level on its web interface. Aim for at least 15 dB of fade margin. Re-align antennas, increase antenna gain, change channel, or add a higher mast.
Connection drops every ~30 minutes Demo version of OpenModbus/TCP still in use Inspect REG_KEY; the demo key is recognisable by its prefix. Install the purchased license and re-key the FB.
CPU goes to STOP shortly after Modbus traffic starts OB35 cycle time exceeded; large Modbus PDU is fragmenting the program scan Read the diagnostic buffer of the CPU. Reduce HR_COUNT and IR_COUNT, increase OB35 cycle time, or move the FBs to OB1.
DIAG LED on the IM151-8 flashes red, PROFINET IO goes down X1 port overloaded because Modbus was accidentally mapped to X1 Confirm in HW Config that the Modbus listener is bound to X2. Re-assign the Modbus server to the X2 IP; restart the CPU.

13. Notes on the OpenModbus/TCP Wizard

STEP 7 V5.5 ships a so-called OpenModbus/TCP Wizard that automates part of the work described above. The wizard:

  • generates the Modbus image DB from a list of symbols the engineer enters by hand,
  • writes the instance DB for MB_CPSRV and MB_DB_OPEN,
  • inserts the FBs into OB100 and OB1, and
  • creates a default symbol table mapping the I/O symbols to Modbus addresses.

The wizard does not write the S7 program that keeps the process image in sync with the Modbus DB — that part is still the engineer's responsibility. The wizard is a time-saver, not a complete configuration tool. The output of the wizard is identical, in functional terms, to a hand-written configuration as described in section 7.

Limits of the wizard: the wizard's address calculator assumes that bits are packed into words and that the byte order is big-endian. If the application uses 32-bit floats, the engineer must place the high and low words manually and add a comment in the DB to mark the high-word-first convention. RTUs from different vendors interpret byte order differently, so the field-tested convention is to document the order on the data sheet of every Modbus point.

14. Time and Effort Estimate

For a first-time integrator, the time to bring a single ET200S station online as a Modbus server against a Schneider RTU is dominated by the coordination between the two ends and not by the engineering on either side. A typical breakdown is:

Task Estimated time, first deployment Estimated time, repeat deployment
IM151-8 hardware install and PROFINET configuration 4 h 1 h
OpenModbus/TCP library install, license key wiring 2 h 0.5 h
Modbus DB design and FB parameterisation 4 h 2 h
S7 program to keep the Modbus DB in sync with the PI 4 h 2 h
Schneider RTU point database 4 h 2 h
Radio bridge install and line-of-sight test 6 h 3 h
End-to-end commissioning with both parties present 8 h 4 h
Documentation, as-built drawings, point list 6 h 2 h
Total ~38 h (≈ 5 days) ~16.5 h (≈ 2 days)

15. Engineering Checklist

  • CPU firmware ≥ V3.0; OpenModbus/TCP library version matches the CPU firmware series.
  • License key (16 characters) stored in a dedicated DB; backup copy filed with the FAT paperwork.
  • Modbus image DB sized for the worst-case point list plus 20 % spare for future expansion.
  • Port X1 reserved for PROFINET IO and HMI; port X2 used for Modbus TCP to the radio bridge.
  • IP addressing: PROFINET IO subnet on X1 (e.g. 192.168.0.0/24); Modbus subnet on X2 (e.g. 192.168.1.0/24); static route added on the CPU if the RTU is on a third subnet.
  • Modbus unit ID agreed with the RTU integrator (typically 1 or 255).
  • Polling interval agreed at 1 s for measurements, 5 s for totalisers; faster polling wastes radio bandwidth and CPU cycles.
  • Radio bridge tested with at least 15 dB of fade margin before the cabinet is closed up.
  • Diagnostic buffer cleared at handover so that the first real fault is easy to identify.

16. Frequently Asked Questions

Can the ET200S IM151-8 PN/DP act as a Modbus TCP slave?

Yes. The IM151-8 PN/DP can run the S7 OpenModbus/TCP library (article 2XV9 450-1MB02) and present itself as a Modbus TCP server. The server FB is FB101 "MB_CPSRV", which listens on TCP port 502 and reads/writes a configured data block according to the standard Modbus function codes (01, 02, 03, 04, 05, 06, 15, 16, 23).

Which PROFINET port should be used for the Modbus TCP connection when the HMI is on PROFINET?

Use port X2 for the Modbus TCP traffic. Assign X2 a separate IP subnet (for example 192.168.1.0/24) so that the PROFINET IO real-time traffic on X1 is not disturbed and the routing rules for the Modbus segment remain simple. A single-port installation is possible but is not recommended for production because of the IO update-budget impact.

What does the REG_KEY input on the OpenModbus/TCP blocks do?

REG_KEY is a 16-byte string constant that contains the registration key supplied with the purchased 2XV9 450-1MB02 license. The blocks refuse to open a Modbus connection until a valid key is wired in, and report status 16#F001 when the key is missing or wrong. The key is generated against the CPU's serial number, so it is bound to a specific CPU and must be re-issued if the CPU is replaced.

How is the 3 km distance between the ET200S and the Schneider RTU bridged?

The Ethernet segment between the two devices is carried by either a single-mode or multimode fibre link (with the IM151-8 PN/DP FO variant 6ES7 151-8FB01-0AB0 providing a built-in fibre port on X2) or by a pair of 5 GHz industrial Ethernet bridge radios. The radio is transparent at Layer 2, so the Modbus configuration on the IM151-8 and on the RTU is identical to a same-rack deployment.

Can Modbus RTU over RS-485 be used instead of Modbus TCP for a 3 km link?

Technically yes, but it is not recommended. RS-485 is limited to about 1200 m at 9.6 kbit/s, so a 3 km link would require one or more RS-485 repeaters, and the RTU would need a serial port. Modbus TCP over a radio bridge is a more robust and easier-to-maintain solution because the radio is a transparent Layer-2 device and the IP network is the same on both ends.

What status code indicates a licensing problem on the OpenModbus/TCP blocks?

Status word 16#F001 at the STATUS output of MB_DB_OPEN or MB_CPSRV indicates that the registration key is missing, malformed, or registered to a different CPU. Re-enter the 16-character key from the license certificate, or request a new key from the local Siemens partner if the CPU was replaced.

Back to blog