S7 Communication ET200S IM151-8 PN/DP to S7-300 via CP 343-1 Lean

David Krause15 min read
S7-300SiemensTutorial / 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

S7 Communication: ET200S IM151-8 PN/DP to S7-300 via CP 343-1 Lean

This reference documents the complete commissioning path for sending process data between an ET200S distributed station (based on IM 151-8 PN/DP CPU, order number 6ES7 151-8AB00-0AB0 or 6ES7 151-8AB01-0AB0) and a central S7-300 station built around a CPU 315-2DP (6ES7 315-2AG10-0AB0) with a CP 343-1 Lean communications processor (6GK7 343-1CX10-0XE0). The configuration uses S7 communication via FB14 "GET" and FB15 "PUT" on a unilaterally configured connection. The CP 343-1 Lean acts strictly as the S7 server; the IM 151-8 PN/DP CPU acts as the S7 client.

Key architectural constraint: The CP 343-1 Lean is an S7 communication partner and PROFINET IO device only. It cannot be used as a PROFINET IO Controller. If your application requires the CP 343-1 to act as an IO controller, replace it with a CP 343-1 Standard (6GK7 343-1EX30-0XE0) or CP 343-1 Advanced (6GK7 343-1GX30-0XE0). See the SIMATIC NET CP 343-1 Lean product information for the canonical capability matrix.

1. Architecture Overview

The network topology is a single Ethernet segment connecting the IM 151-8 PN/DP CPU and the S7-300 station. The IM 151-8 PN/DP CPU has its own PROFINET interface; the S7-300 reaches Ethernet through the CP 343-1 Lean. The IM 151-8 CPU is technically an S7-300-class controller and supports the same S7 communication function blocks as a standard S7-300 CPU, which is what makes the FB14/FB15 path viable.

S7-300 Station CPU 315-2DP (6ES7 315-2AG10) CP 343-1 Lean (6GK7 343-1CX10) Industrial Ethernet (TCP/IP) ET200S Station IM 151-8 PN/DP CPU (6ES7 151-8AB0x) 4/8 FDI 2 DO DC24V

2. Hardware and Software Prerequisites

Component Order Number Minimum Firmware Notes
CPU 315-2DP 6ES7 315-2AG10-0AB0 V2.6 or later Provides MPI/DP master; Ethernet via CP
CP 343-1 Lean 6GK7 343-1CX10-0XE0 V2.4 recommended S7 + PROFINET IO device only
IM 151-8 PN/DP CPU 6ES7 151-8AB00-0AB0 / 6ES7 151-8AB01-0AB0 V3.0 or later Acts as S7 client
4/8 FDI module 6ES7 131-4BF00-0AB0 or successor n/a 24 V DC fail-safe digital input
2 DO DC24V module 6ES7 132-4BB00-0AB0 or successor n/a 24 V DC / 0.5 A digital output
STEP 7 V5.5 + SP2 or later n/a Required for NetPro S7 connection
S7-300 Standard Library Delivered with STEP 7 n/a Contains FB14/FB15 CPU_300 family
Library source matters: Two copies of FB14 and FB15 exist in STEP 7. Only the variants under Standard Library > Communication Blocks with the family name CPU_300 are correct for the IM 151-8 PN/DP CPU. Variants with the family name CP300PBK from SIMATIC_NET_CP > CP300 target a different execution layer and will leave DONE, ERROR, and STATUS at 0 even when a connection exists.

3. CP 343-1 Lean Capability Matrix

The CP 343-1 Lean (6GK7 343-1CX10-0XE0) is the cost-down variant of the CP 343-1 family. The supported role set must be respected during project planning, otherwise the unilateral S7 connection configuration will not produce a usable partner.

Function CP 343-1 Lean CP 343-1 Standard CP 343-1 Advanced
PROFINET IO Controller No Yes Yes
PROFINET IO Device Yes Yes Yes
S7 Communication Server Yes Yes Yes
S7 Communication Client No Yes Yes
Open Communication (TCP/UDP) No (Lean-only restriction) Yes Yes
PG/OP Routing Limited Yes Yes
Connection Resources (max) 8 S7 connections 16 32

Reference: SIMATIC NET S7 CP 343-1 Lean (6GK7 343-1CX10-0XE0) Product Information.

4. STEP 7 Project and Hardware Configuration

4.1 Insert the S7-300 station

  1. Open SIMATIC Manager and create a new project (File > New).
  2. Insert a SIMATIC 300 station.
  3. Open HW Config and insert a RACK-300, then PS 307 5A, then CPU 315-2DP (6ES7 315-2AG10-0AB0).
  4. Insert the CP 343-1 Lean (6GK7 343-1CX10-0XE0) into slot 4. Assign an IP address (for example 192.168.0.10) and a subnet mask 255.255.255.0.
  5. Save and compile HW Config, then download to the CPU.

4.2 Insert the ET200S station

  1. Insert a second SIMATIC 300 station. The IM 151-8 PN/DP CPU is catalog-listed under SIMATIC 300 > CPU-300 > ET200S CPUs.
  2. Insert the IM 151-8 PN/DP CPU (6ES7 151-8AB01-0AB0) and assign IP 192.168.0.20, subnet 255.255.255.0.
  3. Add the 4/8 FDI and 2 DO DC24V modules in HW Config exactly as they appear physically on the backplane bus.
  4. Save, compile, and download.

4.3 Verify IP-layer connectivity

Before opening NetPro, confirm that the IM 151-8 and the CP 343-1 Lean can be reached on Layer 3.

  1. Disconnect the IM 151-8 from the line and plug a laptop into the same cable.
  2. Assign the laptop IP 192.168.0.20 (the IM 151-8 IP).
  3. Ping the CP 343-1 Lean at 192.168.0.10. A reply confirms the physical link, switch port, and IP assignment on the CP.
  4. If the ping fails, repeat with the laptop set to 192.168.0.10 and the target CP unplugged to isolate which side is misconfigured.

5. NetPro S7 Connection Configuration

The CP 343-1 Lean only acts as an S7 server. The IM 151-8 PN/DP CPU acts as the S7 client. Only the client side needs to know about the connection. The partner S7-300 with CP 343-1 Lean is never downloaded with connection data.

  1. In SIMATIC Manager, double-click NetPro in the ET200S station (the IM 151-8 project).
  2. Right-click the CPU icon of the IM 151-8 and select Insert New Connection.
  3. In the dialog choose the partner CPU as unspecified with connection type S7 connection.
  4. Set the partner IP address to 192.168.0.10 (the CP 343-1 Lean).
  5. Leave the local ID at the default; STEP 7 assigns an ID such as 1. Record this ID — it is the value for the ID input of FB14/FB15.
  6. Activate the option "One-way connection (active partner establishes the connection)". This is what makes the S7 connection unilateral.
  7. Confirm with OK. The connection arrow is drawn from IM 151-8 to the CP 343-1 Lean.
  8. Compile NetPro (Network > Compile and Check Objects) and download only the IM 151-8 station — do not download connection data into the S7-300 station.
IM 151-8 PN/DP S7 client active partner CP 343-1 Lean S7 server passive partner Unilateral S7 connection

6. Programming FB15 "PUT" in the IM 151-8 CPU

The PUT block writes local data from the IM 151-8 to a data area inside the CPU 315-2DP. It is a one-shot triggered by a rising edge on REQ.

6.1 Block insertion

  1. In the IM 151-8 program, open the block folder.
  2. From Standard Library > Communication Blocks, drag FB15 PUT into the program. STEP 7 creates an instance DB (DB203 in the reference example).
  3. Right-click the FB15 instance, choose Object Properties > General Part 2. The family must read CPU_300. If it reads CP300PBK, the wrong copy was inserted; delete the instance and re-drag from Standard Library > Communication Blocks.

6.2 Block call (LAD / STL)

CALL "PUT" , DB203
     REQ    := M1.7            // rising edge triggers send
     ID     := W#16#1          // connection ID from NetPro (decimal 1)
     DONE   := M20.0           // job finished without error
     ERROR  := M20.1           // error while job executing
     STATUS := MW30            // status / error code (WORD)
     ADDR_1 := P#DB15.DBX0.0 BYTE 3   // target area in partner CPU
     SD_1   := P#DB15.DBX0.0 BYTE 3   // source area in local CPU

The example above writes the first three bytes of DB15 on the IM 151-8 to the first three bytes of DB15 on the CPU 315-2DP. The ID value is the connection ID assigned by NetPro; if you assign multiple S7 connections, each gets its own ID.

REQ must be a one-shot. Holding REQ high does not retrigger PUT. Wrap the trigger in edge evaluation. A common pattern is to toggle a clock marker or use a positive-edge contact on a handshake bit returned from the partner.

7. Programming FB14 "GET" in the IM 151-8 CPU

GET is the mirror of PUT and reads remote data from the CPU 315-2DP into a local DB on the IM 151-8. The call shape is identical apart from the input/output operands.

CALL "GET" , DB204
     REQ    := M2.0            // rising edge triggers fetch
     ID     := W#16#1          // connection ID (same as PUT)
     DONE   := M21.0
     ERROR  := M21.1
     STATUS := MW32
     ADDR_1 := P#DB16.DBX0.0 BYTE 4   // source area in partner CPU
     RD_1   := P#DB16.DBX0.0 BYTE 4   // destination area in local CPU

The partner data blocks (DB15, DB16 in the example) must exist on the CPU 315-2DP. If the DB does not exist on the partner, the partner replies with a negative acknowledgment and STATUS surfaces an error code such as W#16#000A (partner CPU in STOP or partner DB does not exist).

8. Status Word Capture Logic

DONE, ERROR, and STATUS from FB14/FB15 are only valid for the OB1 scan that follows the rising edge of REQ. If the OB1 logic does not latch these values, the diagnostic information disappears within a single cycle and the field engineer sees three zeros forever.

Use a positive-edge flag combined with a result latching rung.

// Edge detect on REQ (FBD or STL)
A M 1.7          // REQ source
FP M 50.0        // one-shot
S M 51.0         // request pending

// Result latch
A M 20.0         // DONE
R M 51.0
A M 20.1         // ERROR
JC _err
L MW 30          // STATUS
T MW 34          // latched STATUS (visible in VAT or HMI)
_ err: NOP 0

A simpler implementation uses two marker words: MW30 (live STATUS) and MW34 (latched last-error STATUS). The latched value survives the cycle so a commissioning engineer can read it with a VAT or via an HMI tag.

9. Common Status / Error Codes

STATUS (hex) Meaning Typical Cause
0000 No error / job not yet started REQ never pulsed or wrong FB family inserted (CP300PBK)
0001 Communication error Partner unreachable, wrong IP, subnet mismatch
000A Partner not reachable / partner DB missing CPU 315-2DP in STOP, or DB15/DB16 does not exist on partner
000E Data length error BYTE count > 76 bytes total across all ADDR/RD pairs, or odd byte count on a WORD-tagged region
0010 Partner CPU in STOP CPU 315-2DP in STOP, switch to RUN-P
0011 Wrong connection ID ID does not match any configured S7 connection
001F Connection resources exhausted CPU 315-2DP reached its connection limit (16 reserved by default)
8085 Incorrect parameter (ADDR_1) P# pointer to a non-existent DB or wrong byte offset

Reference: Function blocks FB14 GET and FB15 PUT for S7 communication (SIMATIC S7-300).

10. Diagnostic Procedure

Follow the sequence below to localize the failure when STATUS stays at 0 or surfaces an unexpected code.

10.1 Layer-1 / Layer-3 check

  1. Verify the Link LED on the IM 151-8 and on the CP 343-1 Lean is steady green.
  2. Ping each device from a laptop in the same subnet.
  3. Check that no duplicate IP exists. Two devices sharing 192.168.0.20 will produce intermittent connection drops with STATUS 0001.

10.2 Connection status in NetPro

  1. Open NetPro in the IM 151-8 station and right-click the S7 connection arrow.
  2. Select Connection Status online.
  3. The expected state is established. A not established state with no error code points at an IP or routing issue; a state of broken down with STATUS 0011 confirms a wrong connection ID.

10.3 CP 343-1 Lean NCM diagnostics

  1. In SIMATIC Manager, right-click the CP 343-1 Lean and choose Object Properties.
  2. Open the Diagnostics tab and click Run.
  3. Look for entries on Connections and Telegrams. A persistent connection attempt refused indicates the partner IP is wrong or the CP is in STOP. A connection broken down by partner with reason no resources indicates that the CPU 315-2DP has run out of connection slots.

10.4 Connection resources on the CPU 315-2DP

  1. Open the online Module Information of the CPU 315-2DP.
  2. Select the Communication tab.
  3. Compare the Reserved and Occupied counters. Each S7 connection consumes one slot. The CPU 315-2DP supports up to 16 reserved connections; the CP 343-1 Lean adds 8 more.
  4. If Occupied equals Reserved, raise the reserved count in HW Config (CPU properties > Communication > Connection Resources) or close unused connections.

11. Common Pitfalls and Root Causes

Symptom Likely Root Cause Fix
DONE, ERROR, STATUS all zero forever Wrong FB family inserted (CP300PBK instead of CPU_300) Delete the instance, drag FB14/FB15 from Standard Library > Communication Blocks
DONE = 1 but partner DB unchanged Wrong ADDR_1 pointer or partner DB does not exist Verify the DB exists on the CPU 315-2DP and that the byte count matches the actual length
STATUS = 0001 IP unreachable, subnet mismatch, or switch port blocked Ping from a laptop, check the switch port configuration
STATUS = 0010 CPU 315-2DP in STOP Switch the CPU to RUN-P, verify no SF / BF LEDs are lit
STATUS = 001F Connection resources exhausted Increase reserved connections in CPU properties or close unused S7 connections
STATUS = 0011 ID parameter does not match NetPro Cross-check the ID input against the ID assigned by NetPro
Connection status flashes "connection broken down" CP 343-1 Lean in STOP or wrong firmware Set CP to RUN, verify firmware ≥ V2.4
Intermittent failures under load REQ held high instead of edge-triggered Insert an edge evaluation on REQ

12. Alternative Communication Paths

If the application requires the S7-300 to push data into the IM 151-8 (reverse direction without the IM 151-8 acting as client), or if PROFINET IO controller functionality is required on the CP 343-1 side, consider one of the following.

12.1 Replace CP 343-1 Lean with CP 343-1 Standard or Advanced

Both CP 343-1 Standard (6GK7 343-1EX30-0XE0) and CP 343-1 Advanced (6GK7 343-1GX30-0XE0) can act as a PROFINET IO Controller. They also support S7 client mode and Open Communication (TCP/UDP via TCON, TSEND, TRCV). If the IM 151-8 is acting as a PROFINET IO device under the CP 343-1 Standard/Advanced, the CP can also be configured with FC11/FC12 PNIO_SEND / PNIO_RECV for IO data exchange. See the SIMATIC NET S7 CP 343-1 Function Manual.

12.2 PROFINET IO controller with FC11 / FC12

When the CP 343-1 Standard/Advanced is the PROFINET IO controller, FC11 "PNIO_SEND" and FC12 "PNIO_RECV" are used instead of GET/PUT. These blocks exchange IO process data directly with the IM 151-8 PROFINET device interface, which has lower latency than the S7 path. See the FC11 / FC12 PROFINET IO controller blocks (SIMATIC S7-300) reference.

12.3 Both-sided S7 connection

If the application requires both controllers to push data into each other, configure a both-sided S7 connection in NetPro instead of a unilateral one. In this case both stations must download the connection data, and both stations must allocate a free connection ID.

13. Verification and Commissioning Checklist

  1. IP layer: ping both stations from a laptop in the same subnet. Reply time should be < 1 ms on a switch-segmented network.
  2. Connection status: NetPro online view shows the S7 connection as established.
  3. Single PUT test: write a pattern (for example DB15.DBB0 = 16#AA) from the IM 151-8 to the CPU 315-2DP, then read DB15.DBB0 with a VAT on the partner. Value must match.
  4. Single GET test: write a pattern into a partner DB, trigger a GET on the IM 151-8, observe the destination area updated.
  5. Done / Error timing: DONE = 1 for exactly one OB1 scan after the request completes; STATUS latched word shows 0 for a healthy exchange.
  6. Load test: trigger PUT at 100 ms intervals for one hour. STATUS must remain 0 and DONE must pulse on every cycle.
  7. Stop test: stop the CPU 315-2DP. STATUS must surface 0010. Restart the partner. STATUS must return to 0 on the next request.
  8. Connection resource test: open the CPU 315-2DP Module Information > Communication tab. The S7 connection counter must show one extra occupied slot per active S7 connection.

14. Field-Proven Caveats

Cable length and switch placement. Industrial Ethernet on PROFINET segments is rated to 100 m over copper. A cabling fault beyond 100 m will not surface as a Link-down; it will surface as intermittent timeouts with STATUS 0001. Use a managed switch with port statistics to verify CRC error counters.
CP 343-1 Lean firmware. CP 343-1 Lean variants before firmware V2.0 do not support the modern S7 connection resource model. If you must integrate an older field device, upgrade the CP firmware via the SIMATIC Manager online functions before commissioning.
PUT/GET data width. A single PUT call transports at most 76 user-data bytes summed across all ADDR/SD pairs. If your application needs more, segment the transfer into multiple PUT calls with separate ID parameters and schedule them in a round-robin OB.

15. Reference Documentation Set

The following Siemens manuals are required reading for engineers maintaining this configuration.

FAQ

Why does the CP 343-1 Lean not appear as a PROFINET IO controller in HW Config?

The CP 343-1 Lean is designed as an S7 communication partner and a PROFINET IO device only. To obtain PROFINET IO controller functionality, replace it with a CP 343-1 Standard (6GK7 343-1EX30-0XE0) or CP 343-1 Advanced (6GK7 343-1GX30-0XE0).

FB14 / FB15 is called correctly but DONE, ERROR, and STATUS stay at 0 in every scan.

The wrong FB family was inserted. The correct FB14 / FB15 must come from Standard Library > Communication Blocks with the family name CPU_300. The variant from SIMATIC_NET_CP > CP300 has the family name CP300PBK and executes on the wrong layer; delete that instance and reinsert the CPU_300 variant.

How many S7 connections can the CPU 315-2DP and the CP 343-1 Lean handle together?

The CPU 315-2DP reserves up to 16 S7 connections; the CP 343-1 Lean reserves up to 8. Together that is 24 S7 connections, but the reservation must be configured in HW Config > CPU Properties > Communication > Connection Resources. If Occupied equals Reserved, FB14 / FB15 returns STATUS W#16#001F (connection resources exhausted).

Do I have to download the S7 connection into the CPU 315-2DP station?

No. The S7 connection is configured unilaterally on the IM 151-8 station. The CP 343-1 Lean acts as the passive server and is not aware of the connection at configuration time; it only consumes connection data when an active partner connects. Compile and download NetPro for the IM 151-8 only.

What STATUS code means "partner CPU is in STOP"?

STATUS = W#16#0010 indicates the partner CPU is in STOP. Switch the CPU 315-2DP to RUN-P, clear any SF / BF LEDs, and trigger a fresh REQ pulse on FB14 / FB15. The next call should return STATUS = 0 and DONE = 1.

Can I combine GET and PUT on the same S7 connection ID?

Yes. A single unilateral S7 connection is bidirectional in terms of data flow. Use the same ID parameter for both FB14 and FB15 instances. The two blocks share the underlying connection resource but operate independently on each REQ edge.

Back to blog