S7-315-2 PN/DP PROFINET Communication: PUT/GET Configuration

David Krause11 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

S7-315-2 PN/DP PROFINET Communication: PUT/GET Configuration Guide

The SIMATIC S7-315-2 PN/DP (order number 6ES7 315-2EH14-0AB0, firmware V3.3 and successor variants such as 6ES7 315-2FJ14-0AB0) integrates a PROFINET interface that supports both PROFINET IO controller/device operation and standard S7 communication. For peer-to-peer data exchange between two S7-315-2 PN/DP controllers without PROFINET IO, the recommended approach is the PUT/GET instruction pair inside one CPU (the "master"), with the partner CPU acting as the passive S7 server.

This guide covers a typical scenario: one master CPU sending 70 INT values (140 bytes) to a slave CPU and reading back 40 INT values (80 bytes) from that same slave. Both controllers are physically connected through their integrated PROFINET ports on a switched Ethernet segment. Implementation uses STEP 7 V5.x or TIA Portal V15.1 and later.

Topology note. PROFINET on the S7-315-2 PN/DP is standard 100 Mbit/s Ethernet. Use managed switches (e.g., SCALANCE XC-200) for installations longer than 50 m or when more than two nodes participate. Direct crossover cable is allowed for a two-node bench test only.

1. Prerequisites

Hardware and software requirements
Item Specification
CPU A (master) 6ES7 315-2EH14-0AB0, FW ≥ V3.3
CPU B (slave) 6ES7 315-2EH14-0AB0, FW ≥ V3.3
PROFINET cabling Cat5e or higher, RJ45, max 100 m per segment
Programming tool STEP 7 V5.6 SP2 / TIA Portal V15.1+
License None additional for PUT/GET
Connection resources 1 S7 connection reserved for PUT/GET pair

Verify the partner CPU allows PUT/GET access. In STEP 7 V5.x: Properties → Protection. In TIA Portal: Device configuration → Properties → Connection mechanisms → Permit access with PUT/GET communication. The CPU protection level must be set to "No protection" or the password must be entered.

2. Network Planning and IP Addressing

Assign static IP addresses from a dedicated industrial subnet. Avoid DHCP on PROFINET segments.

Recommended IP addressing
Device IP address Subnet mask PROFINET device name Role
CPU A 192.168.0.10 255.255.255.0 plc-master PUT/GET client
CPU B 192.168.0.20 255.255.255.0 plc-slave S7 server
PG/PC (engineering) 192.168.0.100 255.255.255.0 — Online access

The PROFINET device name is required only when PROFINET IO devices are connected. For pure S7 communication via PUT/GET, the IP address is sufficient. The default gateway and DNS are not required for a closed industrial segment.

3. Project Structure in STEP 7 V5.6

  1. Open SIMATIC Manager and create a new project, e.g., S7_PN_MasterSlave.prj.
  2. Insert SIMATIC 300 Station twice: rename to PLC_Master and PLC_Slave.
  3. For each station, open Hardware and insert:
    • Rack 0, Slot 1: PS 307 5A (6ES7 307-1EA01-0AA0) — required for configuration only.
    • Rack 0, Slot 2: CPU 315-2 PN/DP, order number 6ES7 315-2EH14-0AB0.
    • Double-click the PN interface (X2) and configure IP address + subnet as in the table above.
  4. Save and compile the hardware (Station → Save and Compile).

4. Configuring the S7 Connection

The PUT/GET blocks require a configured S7 connection. Open NetPro on the master station.

  1. In NetPro, select the master CPU row.
  2. Right-click → Insert New Connection.
  3. Connection partner: PLC_Slave. Type: S7 connection.
  4. In the connection properties, leave the local ID default (e.g., 1) — this becomes the ID input parameter of PUT/GET.
  5. The partner IP address is filled in automatically from the slave's PN interface configuration.
  6. Save and compile (NetPro → Network → Save and Compile).

When NetPro compiles, the connection is downloaded to the master on next online operation. The slave does not need a configured connection; it automatically accepts incoming S7 PUT/GET requests when access is permitted.

5. Data Block Layout

Create a shared data block on each CPU. Standard accessible blocks (DBs with Not optimized attribute) must be used; optimized symbolic blocks are reachable but require non-standard handling in some TIA versions.

5.1 Master DB (DB100, master CPU)

DATA_BLOCK "DB_Master_Out"
  STRUCT
    SendData : ARRAY[1..70] OF INT;   // 140 bytes
    RecvData : ARRAY[1..40] OF INT;   //  80 bytes
    Status   : DWORD;                 // PUT/GET return codes
  END_STRUCT
END_DATA_BLOCK

5.2 Slave DB (DB200, slave CPU)

DATA_BLOCK "DB_Slave_In"
  STRUCT
    RecvData : ARRAY[1..70] OF INT;   // mirror of master SendData
    SendData : ARRAY[1..40] OF INT;   // mirror of master RecvData
    Heartbeat : BOOL;                 // toggle each scan
  END_STRUCT
END_DATA_BLOCK

Symbolic access on both sides makes the PUT/GET address specification readable.

6. PUT/GET Programming

In TIA Portal, the blocks are called PUT and GET. In STEP 7 V5.x they are FB 15 PUT and FB 14 GET, located in the Standard Library → Communication Blocks.

6.1 OB1 of the master CPU — send (PUT) and receive (GET)

// Cyclic call at OB1 scan rate. Rising edge on REQ triggers one transfer.
// Use a 1 Hz clock flag (e.g., M10.5 from clock memory) on REQ.

CALL  "PUT" , DB15
   REQ     := M10.5
   ID      := W#16#1            // connection ID from NetPro
   DONE    := M100.0
   ERROR   := M100.1
   STATUS  := MW102
   ADDR_1  := P#DB200.DBX 0.0 BYTE 80       // slave: first 80 bytes (40 INT)
   ADDR_2  := P#DB200.DBX 80.0 BYTE 0       // no second area
   SD_1    := P#DB100.DBX 0.0 BYTE 140      // master: send 70 INT
   SD_2    := P#DB100.DBX 140.0 BYTE 0     // not used
   LEN     := 140                          // total payload bytes
   // SD_3, SD_4, ADDR_3, ADDR_4 omitted for S7-300
;

CALL  "GET" , DB14
   REQ     := M10.5
   ID      := W#16#1
   DONE    := M101.0
   ERROR   := M101.1
   STATUS  := MW104
   ADDR_1  := P#DB200.DBX 0.0 BYTE 80       // read first 40 INT from slave
   ADDR_2  := P#DB200.DBX 80.0 BYTE 0       // not used
   RD_1    := P#DB100.DBX 140.0 BYTE 80     // write to RecvData area
   RD_2    := P#DB100.DBX 220.0 BYTE 0     // not used
   LEN     := 80
;

6.2 Parameter table

PUT/GET block I/O parameters
Parameter Type Description Value in this project
REQ BOOL Trigger on rising edge Clock bit M10.5 (1 Hz)
ID WORD Local connection ID W#16#1
NDR / DONE BOOL Transfer complete (no error) M100.0 / M101.0
ERROR BOOL 1 = error occurred M100.1 / M101.1
STATUS WORD Detailed return code MW102 / MW104
ADDR_1..4 REMOTE_PTR Any pointer to partner area See code
SD_1..4 / RD_1..4 LOCAL_PTR Any pointer to local area See code
LEN INT Total payload bytes 140 (PUT) / 80 (GET)
Length limit. On the S7-315-2 PN/DP (FW V3.3), the maximum PUT/GET payload is 160 bytes per call. The 70 INT (140 B) send and 40 INT (80 B) receive both fit in a single call. If the user data exceeds 160 B (e.g., 100 INT = 200 B), split the transfer into multiple PUT/GET calls pointing to consecutive areas and call them sequentially with different connection IDs.

7. Alternative Path: FETCH/WRITE via Open Communication Wizard

If the PUT/GET path is unavailable because the slave CPU is in a remote rack or because the application requires FETCH/WRITE semantics (RFC 1006 over ISO-on-TCP), use the Open Communication Wizard from Siemens. This generates the connection DB and parameterises FB 8 USEND, FB 9 URCV, FB 10 FETCH (FB 11 FETCH_R) and FB 12 WRITE for ISO-on-TCP (port 102).

  1. Install Open Communication Wizard from the STEP 7 DVD or the Siemens support portal.
  2. Select Fetch/Write with connection type ISO-on-TCP.
  3. Wizard generates DBs (e.g., DB300) containing the connection description: REM_STADDR, TSAP_ID_LEN, TSAP_ID, partner IP.
  4. Call FB 11 FETCH_R in OB35 with cycle of 100 ms; the slave CPU returns data from the requested DB area.

Use FETCH/WRITE only when PUT/GET is explicitly disabled by the slave protection configuration or when integrating to a third-party S7 client.

8. Connection Resource Accounting

The S7-315-2 PN/DP reserves a finite number of connection resources. For FW V3.3:

Connection resources on 6ES7 315-2EH14-0AB0
Resource type Maximum Reserved by this project
PG connections 4 (reserved) 1 (online)
OP connections 4 (reserved) 0
S7 connections 16 total / 16 max 1 (PUT/GET)
HMI/OPC connections Shared with OP 0

The S7-300 does not dynamically assign connection resources; every reserved resource reduces available OP/PG slots. Plan ahead: each PUT/GET pair to a unique slave uses one S7 connection. With eight slaves, you consume eight S7 connections.

9. Download and Online Test

  1. Download hardware configuration to both CPUs (PLC → Download to Target Station).
  2. Download the program (OB1, DB100, DB15, DB14) to the master, and DB200 + OB1 (slave logic) to the slave.
  3. Switch both CPUs to RUN.
  4. Open the master online with Monitor/Modify on DB100. Set values in SendData[1..70].
  5. On the slave, open DB200 online; RecvData[1..70] should mirror within 1 second (clock period of M10.5).
  6. Modify DB_Slave_In.SendData[1..40] on the slave; the master DB100 RecvData should reflect the change.

10. Diagnostics and Verification

Use the diagnostic buffer (PLC → Diagnostic Buffer) on both CPUs. For deeper inspection, evaluate the STATUS word of PUT/GET blocks. Common return codes:

PUT/GET STATUS codes (S7-300 / S7-400 standard library)
STATUS (hex) Meaning Remedy
0000 No error —
7000 No job active Check REQ trigger
7001 First call, job initiated —
7002 Follow-up call, job running —
80A1 DB / area does not exist on partner Create DB200 on slave
80A4 Partner CPU not in RUN or protection active Check slave RUN LED and protection settings
80A7 Partner rejects PUT/GET access Enable access in slave protection
80B2 Pointer / length error Verify LEN ≤ payload, byte-aligned pointers
80C3 No connection resource available Check connection table, see §8
80C4 Temporary connection error Verify IP reachability with PING
8181 Target address out of partner memory Adjust ADDR_1 area offset/length
8183 SD/RD pointer invalid locally Check DB number exists and is non-optimised
8184 LEN parameter invalid Use even LEN aligned to byte boundary
8188 LEN parameter exceeds 160 bytes Split into multiple calls (§6 note)

Verify IP reachability first: from the master engineering station, ping 192.168.0.20. A time-out indicates a switch, cabling, or IP-misconfiguration issue rather than a programming fault. Then use NetPro's Check Connection (right-click the connection → Connection Status).

11. Troubleshooting Matrix

Common faults and corrective actions
Symptom Probable cause Action
DONE never sets, STATUS = 80C4 No IP connectivity PING from PG, check subnet mask, swap cable
DONE never sets, STATUS = 80A7 Slave blocks PUT/GET Enable access in slave protection
STATUS = 80B2 / 8183 Local DB pointer error Confirm DB exists, non-optimised, byte-aligned
STATUS = 8181 Target area out of partner memory Reduce LEN or correct ADDR offset on partner DB
STATUS = 80A1 Partner DB not present Create DB200 and download to slave
Intermittent timeouts, STATUS = 8186 Connection resource exhausted Reduce number of S7 connections; check reserved PG/OP
Receive data frozen at 0 Wrong ADDR_1 offset on partner Re-verify partner DB byte layout
SF LED lit on master, BF2 LED lit on PN port Partner not reachable Check partner IP, switch port LED, link integrity
Master SF only Connection error to slave Open diagnostic buffer; verify connection ID matches NetPro
TIA Portal connection OK, but PUT returns 80C4 PG/OP reservation priority too low Open CPU properties → Communication, lower the PG/OP reservation or raise S7 connection priority

12. Performance and Timing Considerations

PUT/GET on the S7-315-2 PN/DP uses the standard S7 communication stack. Typical transfer times:

Measured round-trip times (PROFINET port, 100 Mbit/s, FW V3.3)
Payload PUT cycle time GET cycle time
80 bytes ≈ 20 ms ≈ 18 ms
140 bytes ≈ 28 ms ≈ 25 ms
160 bytes (max) ≈ 30 ms ≈ 27 ms

Calling PUT/GET faster than the transfer time causes STATUS = 7002 (job still active). Use a 100 ms or 1 s clock on REQ for non-time-critical data. For sub-10 ms determinism, switch to PROFINET IO real-time (IRT) with slot-based data exchange — but that requires a PROFINET IO device on the slave side and is out of scope for this S7-only PUT/GET path.

13. Commissioning Checklist

  • ☐ IP addresses assigned and reachable (PING).
  • ☐ Slave CPU protection permits PUT/GET.
  • ☐ Partner DB exists on slave, non-optimised, byte-aligned, correct length.
  • ☐ Connection configured in NetPro / TIA "Connections" with valid local ID.
  • ☐ ID parameter of PUT/GET matches the local connection ID (W#16#1 or TIA symbolic ID).
  • ☐ LEN ≤ 160 bytes, even number.
  • ☐ REQ edge generated at acceptable rate.
  • ☐ DONE / ERROR / STATUS monitored.
  • ☐ Connection resource budget reviewed.
  • ☐ Diagnostic buffer free of new entries after download.

14. Frequently Asked Questions

What is the maximum data size per PUT/GET call on the S7-315-2 PN/DP?

Up to 160 bytes per call on the S7-315-2 PN/DP with firmware V3.3 and later. For 70 INT (140 B) and 40 INT (80 B), both fit in a single call each. Larger payloads require splitting into multiple PUT/GET calls with different connection IDs.

Why does PUT return STATUS 80A7 even though the slave is in RUN?

The slave CPU protection blocks PUT/GET access by default in STEP 7 V5.x and TIA Portal. Enable Permit access with PUT/GET communication in the CPU properties, or set the protection level to "No protection" (not recommended for production). Download the new configuration.

Can the slave CPU also initiate a PUT/GET transfer?

Yes. Each CPU can host a PUT/GET pair. Configure a separate S7 connection in each NetPro view, using distinct connection IDs. For two-way master/slave symmetry, four blocks total (PUT_A, GET_A on CPU A; PUT_B, GET_B on CPU B) and two connections are needed.

Is STEP 7 V5.6 still supported for the S7-315-2 PN/DP?

Yes, STEP 7 V5.6 SP2 supports the 6ES7 315-2EH14-0AB0 and 6ES7 315-2FJ14-0AB0. For new projects, Siemens recommends migrating to TIA Portal V17/V18, but V5.6 remains fully functional for service and small expansions.

What is the difference between PUT/GET and FETCH/WRITE?

PUT/GET is the modern S7 communication method using the S7 protocol on TCP port 102; it is configured entirely inside the CPU. FETCH/WRITE is a legacy RFC 1006 / ISO-on-TCP service, generated by the Open Communication Wizard, and is mainly used for legacy or third-party integrations.

How many PUT/GET connections can a single S7-315-2 PN/DP sustain?

Up to 16 S7 connections in total (PG/OP/S7/HMI combined). Reserved PG/OP slots consume this budget. With eight slaves each using one connection, eight of the 16 slots remain for engineering and HMI access.

Back to blog