Siemens CM 1542-1 and CP 1543-1 Modbus TCP Configuration Guide

David Krause13 min read
S7-1200SiemensTechnical Reference
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 SIMATIC S7-1500 automation system supports Modbus TCP in three distinct hardware configurations: integrated CPU Ethernet ports, the CM 1542-1 communications module, and the CP 1543-1 (or CP 1545-1) communications processor. Each path uses the same Modbus TCP protocol stack but differs in connection count, project-engineering surface, and the role it can play on the network (client, server, or both). This reference consolidates the official Siemens documentation for all three paths so that an engineer can pick the right hardware for a given Modbus TCP deployment and configure it without ambiguity.

For most S7-1500 projects requiring only a handful of Modbus TCP connections (typically up to four concurrent partners), the CPU's integrated PROFINET interface already offers full client and server support without additional hardware. When the project exceeds the CPU's available OPC UA / open-communication connection resources, or when the Modbus traffic must be isolated onto a physically separate subnet (for example, a plant-floor Modbus ring with no interference to the higher-level PROFINET line), the CM 1542-1 or the CP 1543-1 becomes the correct choice.

Hardware Comparison: CM 1542-1 vs. CP 1543-1 vs. CP 1545-1

The three communication modules belong to the SIMATIC S7-1500 ET 200MP communications family. According to the official SIMATIC S7-1500/ET 200MP manual collection, the CM 1542-1 is intended as a high-performance PROFINET switch port with two RJ45 jacks, while the CP 1543-1 and CP 1545-1 are full communications processors with security and routing features.

Feature CM 1542-1 (6GK7542-1AX00-0XE0) CP 1543-1 (6GK7543-1AX10-0XE0) CP 1545-1 (6GK7545-1AA00-0AB0)
Role on Ethernet PROFINET IO controller / device + switch PROFINET + security + routing PROFINET + security + extended routing
Ethernet ports 2 × RJ45 (integrated switch) 1 × RJ45 1 × RJ45
Modbus TCP Yes (Client / Server) Yes (Client / Server) Yes (Client / Server)
Connection count (Modbus) Up to 16 Modbus TCP connections (firmware dependent) Up to 16 Modbus TCP connections Up to 64 Modbus TCP connections
Security (firewall, VPN) No Yes (stateful firewall, IP filter) Yes
IP routing across subnets No (Layer 2 only) Yes Yes
Typical use High-throughput PROFINET + Modbus on plant floor Secure Modbus gateway to higher-level office network Large connection count + secure remote access

The official Siemens documentation pages list short-designation, article number, and functional scope for each of these modules in the SIMATIC S7-1500/ET 200MP Manual Collection – CM/CP Communication Modules.

Modbus TCP Support Matrix for S7-1500

The S7-1500 system supports Modbus TCP in two distinct flavors:

  1. Modbus TCP (standard) – Function Codes 1, 2, 3, 4, 5, 6, 15, 16, 23 – used for general read/write access to coil, discrete input, holding register, and input register tables.
  2. Modbus TCP via data records – used by SIWAREX WP522 weighing modules; the CP 1543-1 specifically supports this special profile, as documented in the CP 1543-1 installation and commissioning manual.
Hardware Path Modbus Client Modbus Server Max Connections Notes
S7-1500 CPU integrated Ethernet Yes Yes Up to 4 (CPU dependent) No additional HW cost
CM 1542-1 Yes Yes Up to 16 Acts as Layer-2 switch; both ports usable in the same subnet
CP 1543-1 Yes Yes Up to 16 (also supports SIWAREX data-record profile) Adds firewall, IP filter, routing
CP 1545-1 Yes Yes Up to 64 For Modbus-only subnets with high partner count

Selection Decision Path for Three Modbus TCP Connections

A typical engineering question is: "I need three concurrent Modbus TCP connections on a S7-1515. Do I need a CM or CP, or does the CPU's integrated port already cover it?" The following decision tree avoids unnecessary hardware spend.

  1. Confirm the CPU's open-communication connection budget. Every S7-1500 CPU exposes a finite pool of PG/OP, S7, open-communication (TCP/ISO-on-TCP/UDP) and, on the same hardware, a separate Modbus TCP resource. Three Modbus TCP servers/client relationships generally fit inside one CPU's port-1 budget.
  2. Check whether the Modbus partners share the same subnet as PROFINET. If yes, the integrated port can carry the traffic with simple TIA Portal configuration.
  3. If the partners are on a separate subnet (e.g., a Modbus ring at 10.61.x.x while PROFINET is on 192.168.x.x), select the CP 1543-1 or CP 1545-1. Both modules include IP-routing capability, allowing the S7-1500 CPU to reach subnets it could not otherwise see.
  4. If more than 16 Modbus partners are expected, select the CP 1545-1. It raises the connection ceiling to 64.
  5. If PROFINET performance is paramount and the partners are on the same subnet, select the CM 1542-1. It offers a 2-port integrated switch for line or ring topologies and is generally less expensive than a CP.
Engineering note: The CM 1542-1 is a switch, not a router. Subnet isolation in TIA Portal's IP routing table is handled by the CPU, not by the CM. The CP is required when IP routing across subnets is desired.

Modbus TCP Protocol Constraints – Function Codes

The S7-1500 Modbus TCP implementation supports the standard MBAP (Modbus Application Protocol) header and the following Modbus function codes per the Modbus Organization specification:

FC Name Object Type Access Memory Area on S7-1500
1 Read Coils Bit Read Process image output / DB bit
2 Read Discrete Inputs Bit Read Process image input / DB bit
3 Read Holding Registers Word Read DB word
4 Read Input Registers Word Read DB word
5 Write Single Coil Bit Write DB bit
6 Write Single Register Word Write DB word
15 Write Multiple Coils Bit Write DB bit range
16 Write Multiple Registers Word Write DB word range
23 Read/Write Multiple Registers Word Read + Write DB word range

Function codes outside this list (e.g., FC 7, 8, 11, 12, 17, 24, 43) are not supported and result in an exception response 01 (Illegal Function) from the Modbus server.

Prerequisites for Commissioning

  1. Hardware: S7-1500 CPU (1515-2 PN or higher recommended) with free slot or with spare PROFINET port bandwidth. CM/CP module mounted on the left side of the S7-1500 rack (modules slot positions C0 through C5 depending on CPU).
  2. Firmware: CPU firmware ≥ V2.6 for full Modbus TCP server functionality. CM 1542-1 firmware ≥ V3.0 recommended. CP 1543-1 firmware ≥ V3.0 recommended. Latest firmware packages are available through the Siemens Industry Online Support portal.
  3. Software: TIA Portal V16 or later (V17/V18 current at time of writing). Step 7 V5.5 with the "Modbus TCP PN-CP" optional package is the legacy commissioning path for older projects.
  4. License: No license key is required for the Modbus TCP function block library shipped with TIA Portal. SIWAREX-specific data-record profiles use a separate firmware function block.
  5. Network: Static IP addressing on every Modbus partner. Avoid DHCP for Modbus TCP production systems.
  6. Cabling: RJ45 shielded twisted-pair (Cat 5e minimum, Cat 6A recommended for industrial environments). Maximum segment length 100 m for copper.

Step-by-Step Configuration in TIA Portal

  1. Insert the CM/CP into the device view. Drag the module from the hardware catalog ("Communication modules → CM/CP 1542/1543") into the S7-1500 rack. TIA Portal assigns the next free slot automatically.
  2. Assign the Ethernet interface. Open Properties → Ethernet addresses. Enter the IP address, subnet mask, and (optionally) router address. The use router checkbox must be enabled if the module is supposed to reach partners outside its own subnet.
  3. Enable the Modbus TCP protocol. Under Properties → Communication → Modbus, select the role: Modbus TCP Client, Modbus TCP Server, or both. Specify the connection port (default 502, may be changed to a non-privileged port such as 503 to bypass firewall restrictions).
  4. Create partner connections. For each Modbus partner, define a new connection in the CP's connection table. Specify the partner IP address, partner port, connection ID, and a unique local connection resource.
  5. Configure the Modbus data points. Map each Modbus address range (coil, register) to an S7-1500 tag. The mapping uses three fields: Modbus start address, length, and DB tag. The address range must match the partner device.
  6. Compile and download. Compile the S7-1500 project (Hardware + Software) and download to the CPU. The CP/CM receives its configuration as part of the project download.
  7. Check the diagnostic buffers. After the CPU returns to RUN, open Online → Diagnostics → Buffer on the CP. Look for event "Modbus TCP connection established" for each partner.

Modbus TCP Connection Architecture (SVG)

The following inline SVG represents a typical S7-1500 + CM 1542-1 deployment with three concurrent Modbus TCP partners and one PROFINET line:

S7-1515 CPU + CM 1542-1 S7-1500 CPU (PROFINET) CM 1542-1 (Modbus TCP) Port 1 Port 2 Diagnostic buffer Modbus Partner A Modbus Partner B Modbus Partner C PROFINET IO devices

SIWAREX WP522 Special Profile on CP 1543-1

The CP 1543-1 explicitly supports a special Modbus TCP profile targeted at SIWAREX WP522 weighing modules. This profile uses raw data record transfer rather than the function codes listed above. The official installation and commissioning chapter for the CP 1543-1 describes the principle of data transmission and the data record structure. Specifically, each SIWAREX WP522 telegram is wrapped inside a Modbus TCP frame whose function code is set to 43/14 (Encapsulated Interface Transport), and the data is forwarded to the S7-1500 program through the CP's data record interface. Engineers planning a SIWAREX integration must ensure that:

  • The CP 1543-1 is configured as a Modbus TCP Client with the WP522 as the partner.
  • The application program reads the data records using RDREC / WRREC blocks per the SIWAREX manual.
  • The CP firmware is at the level specified in the SIWAREX documentation compatibility matrix.

Verification and Diagnostics

After commissioning, the following verification steps confirm correct Modbus TCP behavior:

  1. LED check. The CM 1542-1 / CP 1543-1 front panel must show steady green on the "LINK" LED for every connected cable, with the "ACTIVE" LED flickering to indicate traffic.
  2. Connection status in TIA Portal. In Online → Diagnostics → Connection status, every configured Modbus connection should appear as established. A red status indicates either an IP mismatch, a partner not listening on port 502, or a firewall on the CP blocking the source IP.
  3. Diagnostic buffer entries. The CP's diagnostic buffer records every connect/disconnect event with timestamp and partner IP. This is the first place to inspect when a partner fails to attach.
  4. Wireshark capture. Connect a managed switch or TAP between the CP and the partner, then capture traffic. Confirm: MBAP header (transaction ID, protocol ID = 0, length, unit ID), expected function code, expected register range, correct byte order (Modbus is big-endian; S7-1500 datablocks are little-endian — byte-swap is the responsibility of the user program or TIA Portal mapping).
  5. Read-back test. With a partner such as a Modbus Poll utility or a third-party SCADA, read FC 3 (Holding Registers) on a known DB word, write a value through the CP, and confirm the read-back matches.

Troubleshooting Matrix

Symptom Likely Cause Diagnostic Step Remediation
Connection never establishes Wrong partner IP, wrong port, partner not Modbus-capable Ping partner; check partner's open ports with netstat Correct IP and port in TIA Portal
Connection establishes then drops after ~30 s CP firewall (CP 1543-1) blocking partner IP Inspect Security → Firewall → IP rules Add IP rule allowlisting partner; verify firewall log
Exception code 02 (Illegal Data Address) on every request Modbus address range outside configured mapping Compare partner request address with CP data point map Extend data point address range or correct partner request
Exception code 03 (Illegal Data Value) Read/write count exceeds maximum FC payload (e.g., FC 3 > 125 registers) Inspect partner's request length Limit partner read/write size to ≤ 125 registers per FC 3/4/16 call
Registers read but values appear swapped Word/byte order mismatch (Modbus big-endian vs. S7 little-endian) Compare hex dump in Wireshark with raw DB Swap bytes/words in user program or use TIA mapping byte-swap option
CPU goes to STOP after Modbus traffic burst Watchdog overflow because user program is too slow to service Modbus OB Inspect diagnostic buffer for OB cycle time exceeded Reduce Modbus update rate, move mapping to a separate cyclic OB
CP "SF" LED on, no traffic CP firmware mismatch with project version Online → Accessible nodes, compare firmware Update CP firmware or downgrade project to match
SIWAREX data records return no data Wrong FC 43/14 sub-function or partner FC routing Inspect data record header in Wireshark Re-confirm WP522 CP configuration per SIWAREX manual

Commissioning Best Practices

  • Use a dedicated VLAN. Separate Modbus TCP traffic from PROFINET whenever possible. The CP 1543-1's IP routing makes this trivial; for the CM 1542-1 it requires an external managed switch.
  • Disable Modbus TCP from the office network. The CP's stateful firewall (where available) should be configured to deny any source IP outside the plant subnet.
  • Stick to static IPs. A Modbus partner whose IP changes after a DHCP lease renewal will silently drop the connection.
  • Document the Modbus address map at project handover. Many SIWAREX, Vacon, ABB, Schneider, and third-party inverters use non-consecutive address ranges, so a side-by-side tag map is a wise investment.
  • Set the keep-alive / poll interval explicitly. Even though TCP keep-alive is automatic, the application-level poll interval (in the client's user program) should be defined; this avoids silently flooding the partner during engineering access.
  • Test failover scenarios. If a CP is used for redundancy, validate that the secondary CP takes over the Modbus connections within the partner's timeout window (typically 3–10 seconds).
Safety notice: Modbus TCP has no authentication or encryption. Exposing a CP 1543-1 directly to the internet is never recommended. Use the CP's VPN or restrict traffic to known good IP ranges at the firewall.

Reference Specifications (CP 1543-1)

The official Siemens product specification for the Simatic CP 1543-1 confirms that the module terminates Industrial Ethernet via an RJ45 connector at 10/100 Mbps, supports full or half-duplex, and ships with the full Modbus TCP stack including the SIWAREX WP522 data-record profile. The module is documented in the manufacturer release at Siemens introduces Simatic CP 1543-1 communication processor, and the device-handling / installation chapter is in the official CP 1543-1 commissioning manual. A key subset of its published specification follows:

Parameter CP 1543-1 Value
Article number 6GK7543-1AX10-0XE0
Ethernet interface 1 × RJ45, 10/100 Mbps, full/half duplex
Power supply 24 V DC via backplane bus
Max Modbus TCP connections 16
Special profiles SIWAREX WP522 data record transport (FC 43/14)
Security Stateful firewall, IP filter list, VPN
Diagnostic web server Yes (HTTPS)
Configuration TIA Portal, STEP 7 V5.5 with optional package

Frequently Asked Questions

Does the S7-1500 CPU support Modbus TCP without additional hardware?

Yes. The integrated PROFINET ports of every S7-1500 CPU ship with Modbus TCP client and server capability. Three concurrent Modbus partners typically fit inside the CPU's open-communication budget without any CM or CP.

Can the CM 1542-1 act as a Modbus TCP server?

Yes. The CM 1542-1 supports both Modbus TCP client and server roles. The CM has no routing or firewall features, so it must share its subnet with the Modbus partners.

How many Modbus TCP connections does the CP 1543-1 support?

Up to 16 concurrent Modbus TCP connections per CP 1543-1 in the standard configuration. The CP 1545-1 raises this ceiling to 64.

Does the CM 1542-1 support the SIWAREX WP522 Modbus profile?

No. The SIWAREX WP522 data-record profile (using Modbus FC 43/14) is documented only for the CP 1543-1 and CP 1545-1 communications processors, not for the CM 1542-1 communications module.

Which function codes does S7-1500 Modbus TCP support?

Function codes 1, 2, 3, 4, 5, 6, 15, 16, and 23 are supported. Requests for unsupported codes (e.g., FC 7, 8, 11, 12, 17) receive an exception response code 01 from the S7-1500 Modbus server.

Why do my Modbus register values appear swapped on the S7-1500?

Modbus TCP carries registers in big-endian byte order, while S7-1500 data blocks use little-endian. Either configure the TIA Portal mapping to byte-swap words or convert the values in the user program.

Can I configure Modbus TCP on a CP 1543-1 with TIA Portal V16?

Yes. TIA Portal V16 and later support the full Modbus TCP feature set for the CM 1542-1, CP 1543-1, and CP 1545-1. Earlier TIA Portal versions support the same features with reduced diagnostic surface.

Back to blog