Overview
This technical reference explains how to establish S7 communication between an S7-300 station equipped with a Siemens CP 343-1 Lean communications processor and an S7-1200 station equipped with a CP 1243-1, using the PUT and GET function blocks available in the S7-1200 user program. The documented limitation is fundamental to the CP 343-1 Lean firmware: the Lean variant supports only the S7 server role on ISO-on-TCP connections (transport protocol RFC 1006, port 102); it does not implement the active client role. As a result, the connection establishment request must originate from the CP 1243-1 (and S7-1200), which acts as the active client. The S7-300 station acts as the passive server in this configuration.
Configuring the project against this constraint eliminates several classes of failure commonly encountered: endless CPU diagnostic buffer entries for "connection setup failure," PUT/GET blocks that immediately return STATUS = 16#8085 with no data exchange, silent timeouts in the online connection view, and operators complaining that the HMI sees the S7-300 but the S7-1200 cannot read it. After the configuration is corrected and downloaded to both stations, PUT/GET exchange transfers data bi-directionally with the S7-1200 initiating every transaction. The CP 343-1 Lean remains available for additional S7 connections (such as HMI panels) only in its server role.
CP 343-1 Lean Hardware and the Server-Only Constraint
The CP 343-1 Lean is the entry-level PROFINET communications processor in the S7-300 ecosystem. Common order numbers in deployed fleets include:
| Order Number | Variant | PROFINET Ports | Firmware Family |
|---|---|---|---|
| 6GK7 343-1CX00-0XE0 | CP 343-1 Lean, single port | 1 × RJ45 | V2.x |
| 6GK7 343-1CX10-0XE0 | CP 343-1 Lean, dual port (integrated switch) | 2 × RJ45 | V3.x |
For S7 communication the CP 343-1 Lean establishes connections only on request from a partner; the Lean firmware does not contain the active connection management extension that the full CP 343-1 and CP 343-1 Advanced carry. This applies uniformly across the connection types the Lean supports:
- S7 connections (ISO-on-TCP, transport protocol RFC 1006, port 102) — server only
- TCP connections (open IE communication, Adhoc mode via SEND/RECV or TSEND/TRCV on the partner) — server only
- UDP connections (open IE communication) — server only
- PG/OP and HMI connections — always server
The maximum number of S7 connections on a CP 343-1 Lean is published in the device manual: typically 4 S7 connections on the V3.x firmware, with the Lean variant exclusively in passive server mode. Resources on a Lean CP must be dimensioned accordingly when HMI panels and this S7-1200 are connected simultaneously. Reference: CP 343-1 Lean Manual (Siemens Support).
The practical consequence: any attempt to place a PUT or GET block on the S7-300 user program using the CP 343-1 Lean's connection ID will fail to establish the connection, even when the project is downloaded without compile errors. Engineers who migrate a working S7-300 ↔ S7-400 PUT/GET configuration to S7-300 (with Lean CP) ↔ S7-1200 encounter this failure first.
CP 1243-1 Hardware and the Active Client Capability
The CP 1243-1 is the S7-1200 communications processor that provides the second PROFINET interface for the S7-1200 CPU and supports S7, TCP, UDP, ISO-on-TCP, and Security functions (firewall, VPN) depending on the order number.
| Order Number | Description | S7 Role |
|---|---|---|
| 6GK7 243-1BX30-0XE0 | CP 1243-1 | Server and Client |
| 6GK7 243-1EX30-0XE0 | CP 1243-1 ERC | Server and Client |
| 6GK7 243-1BX40-0XE0 | CP 1243-1 (latest release) | Server and Client |
Reference: CP 1243-1 Manual (Siemens Support).
The CP 1243-1 is fully capable of initiating the connection as an S7 client. With TIA Portal configured as detailed in this article, the CP 1243-1 opens the S7 connection on power-up and re-arms it automatically if the partner drops the connection. The number of S7 connections supported depends on the article variant but is sufficient for the topology in this reference.
The CP 1243-1 is not strictly required if the S7-1200 CPU's onboard PROFINET port is to be used directly; however, deploying the CP 1243-1 isolates the S7-1200 CPU's onboard PROFINET port for PROFINET I/O or HMI traffic while keeping the S7 communication on a dedicated network segment. The CP 1243-1 also adds IP forwarding, NTP, time synchronization, SNMP, and web diagnostics capabilities that the onboard port does not provide.
Prerequisites and Network Topology
Before configuring, verify the following items:
-
Hardware:
- S7-300 station with a CPU 31x and a CP 343-1 Lean slot for the S7-1200 communication path.
- S7-1200 station with a CPU 12xx or 15xx and a CP 1243-1.
- PROFINET patch cables, Cat 5e or better, plus a managed or unmanaged PROFINET switch if the physical topology requires one.
-
Software:
- TIA Portal V15.1 or newer for unified engineering of both stations; alternatively, STEP 7 V5.5 SP4 or newer for the S7-300 station and TIA Portal for the S7-1200 station.
- Both projects must be combined into one TIA Portal project (or merged) to configure the S7 connection across both stations from a single editor.
-
IP Plan (placeholder values):
- S7-300 with CP 343-1 Lean: 192.168.0.1 / 255.255.255.0
- S7-1200 with CP 1243-1: 192.168.0.2 / 255.255.255.0
- Router address: not required in the same subnet.
-
Firmware:
- CP 343-1 Lean: firmware V2.4 or higher (latest available recommended).
- CP 1243-1: latest available firmware installed via TIA Portal Online & Diagnostics.
Reference topology (flat PROFINET network with both CPs on the same IP subnet):
S7-300 with CP 343-1 Lean PROFINET Switch S7-1200 with CP 1243-1
192.168.0.1 <-------PROFINET-------> 192.168.0.2
(server) (client/initiator)
Configure each CP with a unique IP address and the same subnet mask. Verify the IP address actually applied to the CP using:
- CP 343-1 Lean: STEP 7 → Online → Accessible Nodes, or the CP's Web server (Lean supports limited Web pages from firmware V3.0 onward).
- CP 1243-1: TIA Portal → Online → Accessible Nodes.
If the S7-300 and S7-1200 stations belong to different IP subnets, a router is required. In that case, configure the IP router on each CP's interface properties and verify the router entries match. Confirm reachability with a PING from each CP's diagnostic pages.
Configuring the S7 Connection in TIA Portal
The S7 connection is created on the client side, i.e., the CP 1243-1. The CP 343-1 Lean only needs to expose its S7 endpoint. The procedure assumes both stations are in the same TIA Portal project.
- Open the TIA Portal project that contains both the S7-300 station and the S7-1200 station.
- Select the S7-1200 station and open Devices & Networks from the project tree.
- Click on the CP 1243-1 in the network view. The inspector window shows the CP's properties.
- From the toolbar, select Connections and choose S7 Connection.
- In the connection creation dialog, configure:
- Endpoint: select the CP 1243-1 as the local endpoint.
- Partner: select the CP 343-1 Lean in the S7-300 station.
- Interface: PROFINET interface of the CP 1243-1.
- Partner Interface: PROFINET interface of the CP 343-1 Lean.
-
Connection name: leave the default or assign a name such as
S7_Lean_to_1243.
- Open the Properties tab of the connection and confirm:
-
Local ID: a unique connection identifier. This ID is referenced as the
IDinput of the PUT/GET blocks. Typical value: 1. - Partner ID: leave the default; partner ID is informational.
- Active connection establishment: enabled on the local side (CP 1243-1). This is the key option; it must be enabled so the CP 1243-1 initiates the connection.
- TSAP / Port: the local TSAP is automatically generated. The partner TSAP is computed from the S7-300 CPU slot; for slot 2 (S7-300 default), the partner TSAP is 02.01.
-
Local ID: a unique connection identifier. This ID is referenced as the
- Compile and download the S7-1200 station including the connection configuration.
- Compile and download the S7-300 station. The CP 343-1 Lean loads the connection configuration and waits for the partner to establish the connection.
STEP 7 V5.x path for legacy S7-300 configuration. If the S7-300 station is configured in STEP 7 V5.5 SP4 instead of TIA Portal, use NetPro for the connection configuration:
- Open NetPro for the S7-300 station.
- Right-click the CP 343-1 Lean and select New Connection.
- Choose S7 Connection as the connection type.
- For the partner, select Unspecific because the S7-1200 station is not represented inside the STEP 7 project.
- Configure the local interface and the partner IP address (192.168.0.2), partner TSAP (using the connection resource ID on the CP 1243-1, e.g., 10.01 for slot 1).
- Click OK to save.
This method requires the connection resource on the CP 1243-1 to be precisely known. TIA Portal's connection editor handles TSAP generation automatically; STEP 7 V5.x requires manual entry.
Programming PUT and GET in the S7-1200 CPU
TIA Portal provides PUT and GET blocks under Instructions → Communication → S7 Communication. Drop these blocks into an OB (typically OB1) or a cyclic FC of the S7-1200 CPU.
PUT block parameters:
| Parameter | Direction | Type | Description |
|---|---|---|---|
| REQ | IN | BOOL | Trigger edge; call once per request |
| ID | IN | WORD | Local connection ID from TIA Portal connection configuration |
| LADDR | IN (newer versions) | HW_ANY | Hardware identifier of the local CP interface (optional) |
| DONE | OUT | BOOL | Set when transfer completes successfully |
| ERROR | OUT | BOOL | Set on error |
| STATUS | OUT | WORD | Status code (16#0000 on success) |
| ADDR_1 | IN | VARIANT/ANY | Remote data area (e.g., P#DB100.DBX0.0 BYTE 100) |
| SD_1 | IN | VARIANT/ANY | Local data source (e.g., P#M100.0 BYTE 100) |
The GET block mirrors the PUT with read direction: ADDR_1 is the remote source, RD_1 is the local destination.
Example SCL code:
"PUT_DB"(REQ := "StartPut",
ID := 16#0001,
DONE => "PutDone",
ERROR => "PutError",
STATUS=> "PutStatus",
ADDR_1:= P#DB100.DBX0.0 BYTE 100,
SD_1 := P#"Data".PutArea);
"GET_DB"(REQ := "StartGet",
ID := 16#0001,
DONE => "GetDone",
ERROR => "GetError",
STATUS=> "GetStatus",
ADDR_1:= P#"Remote DB",
RD_1 := P#"Data".GetArea);
Call the blocks cyclically or on an event. Monitor ERROR and STATUS at every call to capture transient failures. Latch PutError and GetError if the SCADA system requires an alarm on first occurrence.
CPU Protection Settings, Data Block Setup, and Block Limits
By default, an S7-300 CPU does not allow remote PUT/GET access. The setting is configured in the CPU properties:
- Open the CPU 31x properties in the hardware configuration.
- Navigate to Protection.
- Enable Permit access with PUT/GET communication from remote partner (PLC, HMI, OPC, ...).
| Setting | Default | Required for this topology |
|---|---|---|
| PUT/GET access permitted | Disabled | Enabled |
| Operator panel access | Enabled | Enabled |
| Password protection level | None | None (or higher if remote write access is part of the policy) |
Without this option enabled, PUT/GET blocks return STATUS = 16#8304 (access protection error) at runtime even though the connection itself is established. The setting is also reset by certain firmware updates to the S7-300 CPU; verify after any firmware change.
S7-300 data block setup. When the S7-1200 PUT writes to the S7-300, the ADDR_1 pointer points into the S7-300 CPU's data memory. The destination S7-300 DB must be configured as a standard global DB (S7-300 does not support optimized DBs). The DB must be downloaded to the S7-300 CPU and must exist in the S7-300 user program at the time the PUT/GET call is made. If ADDR_1 references a DB that does not exist on the S7-300, the PUT block returns STATUS = 16#8304 or 16#8185 depending on firmware version.
PUT/GET data length limitations. The legacy PUT/GET blocks transfer up to 212 bytes per call. Newer firmware versions of the blocks extend this to 400 bytes. Verify the block version in TIA Portal:
- Right-click the PUT/GET instance DB → Properties → Information.
- Check the block version.
- Compare against the version table in the TIA Portal online help.
For data areas larger than the block's per-call limit, split into multiple PUT/GET calls. The BSEND/BRECV pairing is not supported between S7-1200 PUT/GET and CP 343-1 Lean; stick with PUT/GET and chunk the data on the S7-1200 side.
Status Codes and Online Connection Diagnostics
Below are the most relevant status codes returned by PUT/GET blocks. All values are hexadecimal. For the complete list, refer to the S7-1200 Communication Function Manual: S7-1200 Communication Function Manual (Siemens Support).
| STATUS (hex) | Meaning | Correction |
|---|---|---|
| 0000 | No error | None |
| 7000 | No job currently active | None |
| 7001 | First call; job running | None |
| 7002 | Subsequent call; job running | None |
| 8085 | Connection could not be established | Verify IP, subnet mask, partner reachable, active connection establishment enabled |
| 80A1 | Connection in setup; partner not yet online | Wait or confirm partner CP online and programmed |
| 80C3 | Connection aborted by partner | Verify partner station online; verify partner PUT/GET setting on S7-300 CPU |
| 8185 | Bad input parameter | Verify ADDR_1 length, ID matches connection ID, ADDR_1 within partner CPU memory |
| 8304 | Access protection error | Enable "Permit access with PUT/GET" on the S7-300 CPU |
| 8385 | No connection resource available | Verify connection resource free on partner CP; check Lean CP resource count |
Online connection diagnostics in TIA Portal. TIA Portal provides per-connection diagnostics for both endpoints:
- Right-click the S7-1200 station → Go Online.
- Open Online & Diagnostics for the CP 1243-1.
- Navigate to Connections → S7 Connections.
- The list shows every configured S7 connection with: status (established / not established / not reachable), bytes sent and received, errors and last error code.
- Click the connection in the list and select Details to view the partner IP, TSAP, and active state.
Repeat for the S7-300 station from STEP 7 V5.x or TIA Portal. On the CP 343-1 Lean, the diagnostic view should show:
- Connection ID matches the partner's view.
- Bytes sent/received increment over time.
- No persistent error entries in the diagnostic buffer.
Also inspect the S7-300 CPU's diagnostic buffer for connection-related entries. S7-300 CPU 31x records "Communication error" entries with W#16#01A1 and similar codes when partner connection setup fails. The same diagnostics tree is accessible from CPU → Diagnostic Buffer in TIA Portal when the S7-300 station is added to the same project.
Common Errors and Troubleshooting Matrix
| Symptom | Root Cause | Resolution |
|---|---|---|
| PUT block immediately returns STATUS = 16#8085 | Active connection establishment disabled on CP 1243-1 | Enable in connection properties on local side |
| Connection never appears on CP 343-1 Lean diagnostic | Wrong TSAP, wrong partner IP, partner CPU not in RUN | Verify IP and TSAP; regenerate connection; check CPU mode |
| STATUS = 16#80C3 sporadically | S7-300 CPU PUT/GET protection setting cleared after download | Re-enable "Permit access with PUT/GET" on S7-300; re-download |
| Connection establishes but no data exchange | ADDR_1 points to non-existent partner DB | Confirm partner DB number and length; DB must be a standard non-optimized DB on S7-300 |
| Connection status "not reachable" online | Different subnets; no router configured | Configure router entries on both CPs |
| PUT/GET works for a few minutes then drops | Watchdog or keepalive mismatch between CPs | Verify both CPs share compatible keepalive; tune Send/Receive timeout |
| CPU diagnostic buffer: "Connection setup failure, local ID x" | Local connection resource not downloaded or ID wrong in block | Compile both stations fully; verify ID matches connection configuration |
| Connection online shows "established" but STATUS returns 16#8185 | ADDR_1 length exceeds 212/400 bytes (PUT limit) or wrong pointer format | Split data into multiple PUT calls under block limit; verify pointer syntax |
| PUT/GET works during commissioning but fails after S7-300 firmware update | Firmware update reset protection setting | Re-enable "Permit access with PUT/GET" after every firmware change |
Edge Cases, Migration Notes, and Verification Checklist
Edge case 1: S7-1200 on a different PROFINET subnet from the CP 343-1 Lean. If the S7-1200 CPU's PROFINET port sits in a different subnet than the CP 343-1 Lean, configure the router settings on the CP 1243-1:
- CP 1243-1 properties → Ethernet addresses → IP protocol → Router.
- Enter the router IP for the destination subnet.
- Repeat on the partner CP 343-1 Lean if symmetric routing is required.
Without router configuration, the CP 1243-1 cannot reach the partner CP even though the TCP/IP stack is healthy.
Edge case 2: S7-300 CPU integrated PROFINET port instead of CP 343-1 Lean. The CP 343-1 Lean is not strictly required if the S7-300 CPU's integrated PROFINET port acts as the S7 server endpoint. In this scenario, the CP 1243-1 connects directly to the S7-300 CPU's integrated port using the same PUT/GET configuration as in this article. The CP 1243-1 remains the client; only the partner IP address and slot-based TSAP differ (CPU integrated port TSAP = CPU slot + rack combination, e.g., 0.0 for CPU 315-2 PN/DP in rack 0 slot 2 → partner TSAP 02.00).
Migration note: S7-300 ↔ S7-400 PUT/GET converted to S7-300 (Lean) ↔ S7-1200. Engineers migrating an existing S7-300 ↔ S7-400 configuration to an S7-300 with Lean CP and S7-1200 architecture often place a PUT/GET on the S7-300. That configuration will not work with the CP 343-1 Lean. Move all PUT/GET code to the S7-1200 side and designate the CP 1243-1 as the active client.
Verification and commissioning checklist. Run through these checks before declaring the system commissioned:
- Hardware: Both CPUs in RUN; both CPs show no SF/BF errors.
- Connection: TIA Portal Online → Connections shows the S7 connection as established for both CPs.
- Bytes sent/received: Both CPs show non-zero, increasing bytes-sent and bytes-received counters.
- Status: PUT and GET blocks return STATUS = 16#0000.
- Data integrity: Write a known pattern from the S7-1200, read it back from the S7-300, verify byte-for-byte match.
- Cycle test: Run 100 PUT/GET cycles back-to-back, capture any STATUS ≠ 16#0000.
- Failure injection: Disconnect the PROFINET cable from the CP 343-1 Lean for 10 seconds, reconnect, verify blocks self-heal within 60 seconds.
- Diagnostic buffer: Both CPUs show no connection-related errors after the test.
- Security audit: Confirm only the intended CP 1243-1 has PUT/GET access; review the partner TSAP for accidental wildcard acceptance.
FAQ
Can the CP 343-1 Lean ever act as an S7 client?
No. The CP 343-1 Lean firmware (V2.x and V3.x) implements only the passive server role for S7 connections. Active connection initiation requires the full CP 343-1 or the CP 343-1 Advanced. The CP 1243-1 (S7-1200 side) must therefore be the active client in any topology that includes the CP 343-1 Lean.
What is the maximum PUT/GET data length on the S7-1200 side?
The legacy PUT/GET blocks transfer up to 212 bytes per call. Newer firmware versions of the blocks extend this to 400 bytes. Verify the block version in TIA Portal under block properties. For larger transfers, split the data into multiple PUT/GET calls; BSEND/BRECV is not available between S7-1200 and CP 343-1 Lean.
Why does PUT return STATUS = 16#8304 even though the connection is established?
STATUS = 16#8304 means the partner CPU denied access. On the S7-300 CPU, open CPU Properties → Protection and enable "Permit access with PUT/GET communication from remote partner." Download the configuration to the S7-300 CPU. After re-download, the next PUT call returns STATUS = 16#0000. The setting can be reset by a firmware update, so re-verify after any S7-300 firmware change.
Which firmware version is required on the CP 343-1 Lean for stable S7 communication with the CP 1243-1?
CP 343-1 Lean firmware V2.4 or higher is recommended for stable S7 connection handling with a CP 1243-1 V2.x or higher. Install the latest firmware published on Siemens Support for the specific order number. Upgrade using the firmware loader in TIA Portal Online & Diagnostics.
Does the CP 343-1 Lean require the S7-1200 to define the connection on its side?
No. With active connection establishment enabled on the CP 1243-1, the CP 343-1 Lean only needs to be configured with its IP address and the S7 communication service enabled. No explicit partner connection entry is required on the CP 343-1 Lean. The connection appears in its diagnostic view automatically once the CP 1243-1 initiates it.
What is the partner TSAP value for the S7-300 with CP 343-1 Lean?
The CP 1243-1 connection editor computes the partner TSAP from the S7-300 CPU rack and slot. For a CPU 31x in rack 0 slot 2, the partner TSAP is 02.01 (rack-slot notation). For slot 3 the TSAP is 03.01. The local TSAP is generated automatically and can be left at default unless a fixed TSAP is required by the SCADA topology.