Configuring GET/PUT Communication Between Siemens S7 CPUs
Engineer field notes for CPU-to-CPU data exchange across SIMATIC S7-300, S7-400, and S7-1200 controllers. This reference covers S7 connections, single-sided GET/PUT blocks, both-sided Send/Receive blocks, configuration-only Global Data (GD) over MPI, and PROFINET I-Device data exchange, including connection resource budgets, NetPro / TIA Portal configuration steps, and verification procedures. All examples reference official Siemens documentation: the SIMATIC Communication Function Manual, the S7-1200 manual collection, and the SiePortal topic pages Make communication between two S7-1200 and Connect two PC to S7-300 via MPI.
Overview of Siemens CPU-to-CPU Communication
CPU-to-CPU communication in SIMATIC is performed over a logical S7 connection. An S7 connection defines the endpoints (local and partner CPU), the transport medium (MPI, PROFIBUS, PROFINET/Industrial Ethernet), and the communication blocks that the CPUs use to read or write partner data. The connection must be configured in NetPro (STEP 7 V5.x) or in Devices & Networks (TIA Portal) and downloaded to both endpoints. Once the connection is established at runtime, the program blocks exchange data using the connection ID assigned at configuration time.
Siemens supports four primary methods for exchanging data between S7 CPUs:
- GET / PUT – single-sided communication; only the initiating CPU is programmed.
- Send / Receive (USEND / URCV, BSEND / BRCV) – both-sided communication with explicit partner programming.
- Global Data (GD) – configuration-only broadcast of selected tags over MPI, with no program code required on participating CPUs.
- PROFINET I-Device / PN/PN coupler – process-data exchange between two PROFINET devices with deterministic cycle times.
The method selected depends on the network topology, the data volume and direction, the project phase (legacy STEP 7 vs TIA Portal), and the connection resources available on each CPU.
S7 Connection Fundamentals
An S7 connection is the unit of transport between two SIMATIC stations. Each S7 connection is identified by a local connection ID (1 to 65,535) and a partner connection ID; the local ID is what block calls reference with the ID input. Resources on a CPU are finite and must be budgeted against HMI panels, programming devices, and other controllers that also need connections.
| CPU family | Typical S7 connection resources | Notes |
|---|---|---|
| S7-300 (e.g. CPU 312, CPU 315-2 PN/DP) | 4 to 16 (CPU dependent) | Some CPUs restrict PG/HMI/OP/connection counts; refer to the CPU's data sheet. |
| S7-400 (e.g. CPU 412, CPU 416) | 32 to 64 (CPU dependent) | Reserve channels for redundancy and time sync. |
| S7-1200 (CPU 1211 to CPU 1217) | 3 to 14 (CPU dependent) | Number of S7 connections is part of the CPU's technical specifications. |
| S7-1500 (CPU 1511 to CPU 1518) | 32 to 256+ (CPU dependent) | Higher resource pool; no penalty for full PUT/GET on every cycle. |
To plan a project, subtract the connections required for HMI panels, PG/PC, OPC servers, and any third-party S7 client from the total. A 12-connection CPU with three HMI panels and a PG leaves only eight connections for peer-to-peer CPU traffic.
Communication Methods Compared
| Method | Programming effort | Transport | Max payload per call | CPU support | Use case |
|---|---|---|---|---|---|
| GET / PUT (single-sided) | Only initiator programmed | MPI, PROFIBUS, PROFINET | S7-300/400: 4 × 32 bytes; S7-1200/1500: see block help | All S7-300/400/1200/1500 CPUs | Periodic polling of remote data, no symmetry required. |
| USEND / URCV (uncoordinated) | Both partners programmed | MPI, PROFIBUS, PROFINET | Up to 440 bytes (BSEND) / 8 bytes via SFB8 (USEND) – use BSEND/BRCV for large data | S7-300/400 | Event-driven small messages, simple handshake. |
| BSEND / BRCV (coordinated, segmented) | Both partners programmed | MPI, PROFIBUS, PROFINET | Up to 32,768 bytes per call (CPU dependent) | S7-300/400/1200/1500 | Large data blocks, deterministic transfer acknowledgement. |
| Global Data (GD) | None (configuration only) | MPI (and PROFIBUS on some models) | S7-300: 4 GD circles, 22 bytes each. S7-400: 16 circles, 54 bytes each. Max 15 CPUs. | S7-300/400 with MPI port | Low-rate broadcast of status / setpoints between SIMATIC stations. |
| PROFINET I-Device | I-Device configuration in TIA Portal | PROFINET (Industrial Ethernet) | Deterministic process data; size defined in I-Device interface | PN-enabled S7-300 (CP), S7-400 (CP), S7-1200, S7-1500 | Tight, cyclic exchange between two PROFINET controllers or between controller and upper-level PLC. |
GET / PUT Single-Sided Communication
GET / PUT is the simplest method for one CPU to read or write a partner CPU's memory. Only the initiating CPU executes the block; the partner requires no code. This makes GET / PUT the recommended first step for brownfield migration and is supported on every SIMATIC generation that exposes an S7 connection endpoint.
Block Selection per CPU Family
| CPU family | Get block | Put block | Where it lives |
|---|---|---|---|
| S7-300 / S7-400 (STEP 7 V5.x) | SFB 14 (GET) | SFB 15 (PUT) | Standard library, Communication Blocks |
| S7-1200 (TIA Portal) | GET (FB) | PUT (FB) | Instructions » Communication » S7 communication |
| S7-1500 (TIA Portal) | GET (FB) | PUT (FB) | Instructions » Communication » S7 communication |
The blocks are asynchronous. They are placed in OB 1 (or a cyclic OB), given a positive-edge trigger on REQ, and write the result of the last call to DONE (PUT) or NDR (GET) along with ERROR and STATUS.
Block Parameters in Detail
The S7-300/400 SFB 14 (GET) and SFB 15 (PUT) expose the same input structure. A PUT call has the following signal interface:
-
REQ– rising edge triggers the job. -
ID– the local connection ID from NetPro (e.g.W#16#0003for the third active connection). -
ADDR_i– ANY pointer to the partner area to be written (e.g.P#DB101.DBX0.0 BYTE 20). -
SD_i– ANY pointer to the local source area (PUT only). -
DONE– one-shot pulse on successful completion. -
ERROR– TRUE if the call terminated with an error. -
STATUS– detailed error code (see diagnostic table below).
For GET, the partner data is written to the local area referenced by RD_i (4 max).
Implementation Pattern
A common pattern is to drive a 1 s clock pulse from the system clock byte (e.g. "CPU_1_Scratch".Clock_1Hz) into a flag edge-detection bit and feed that as REQ. Multiple GET / PUT calls can share the same ID as long as the partner permits it, but only one job can be in flight on a connection at a time. To overlap data streams, use multiple S7 connections (one ID per direction or per data group).
STL Skeleton for S7-300/400 PUT
// OB 1 - cyclic 100 ms
A M 10.0 // 1 Hz clock from system byte
FP M 100.0 // edge flag
= "inst_PUT".REQ // drive REQ
CALL "PUT" , "inst_PUT"
REQ := "inst_PUT".REQ
ID := W#16#0003 // NetPro connection ID
ADDR_1:= P#DB101.DBX0.0 BYTE 20
SD_1 := P#DB100.DBX0.0 BYTE 20
DONE := "inst_PUT".DONE
ERROR := "inst_PUT".ERROR
STATUS:= "inst_PUT".STATUS
SCL Skeleton for S7-1200 PUT
// SCL - Function Block "fb_PutToLine2"
IF "Clock_1Hz" THEN
"iDB_Put".REQ := TRUE;
END_IF;
"iDB_Put"(REQ := "iDB_Put".REQ,
ID := 16#0003,
ADDR_1 := P#"DB_Line2".Status,
SD_1 := P#"DB_Line1".StatusOut,
DONE => "iDB_Put".DONE,
ERROR => "iDB_Put".ERROR,
STATUS => "iDB_Put".STATUS);
IF "iDB_Put".DONE THEN
"iDB_Put".REQ := FALSE;
END_IF;
GET / PUT Status Codes (S7-300/400 SFB 14/15)
| STATUS | Meaning | Action |
|---|---|---|
| W#16#0000 | No error | Continue normal polling |
| W#16#7000 | No job in progress | Idle; trigger REQ |
| W#16#7001 | Job start; first call | Monitor |
| W#16#7002 | Job running; intermediate call | Monitor; do not retrigger REQ |
| W#16#8090 | Connection not configured / not established | Check NetPro, download HW config to both CPUs |
| W#16#80A0 | Negative acknowledgement from partner | Check partner CPU state (STOP?), partner blocks, partner DB sizes |
| W#16#80B0 | Data access error on partner | Verify the partner DB number and byte range exist |
| W#16#80C0 | Data type / ANY pointer inconsistency | Recompile the ANY; ensure both ends use the same data type |
| W#16#80F0 | Internal error | Reinitialise the connection (restart CPU if persistent) |
When a GET / PUT call fails immediately, zero out the local receive DB (e.g. fill with 0 on a one-shot) so that stale data does not masquerade as live values after a connection break.
Send / Receive (BSEND / BRCV, USEND / URCV)
Send / Receive blocks are used when both CPUs must participate in the exchange — for example, a job handshake with positive acknowledgement. The S7-300/400 library exposes two pairs:
- USEND / URCV – uncoordinated, up to 440 bytes per call, no implicit acknowledgement from the receiver (data is delivered, but not necessarily read yet).
-
BSEND / BRCV – coordinated, segmented transfer with an explicit
DONEon the receiver side confirming consumption. Suitable for bulk data.
On the partner side, URCV / BRCV is called unconditionally; it is non-blocking and just stores the latest message. The block is typically placed in OB 1 of the receiver and the local data is then read by the application program.
| Block pair | Data integrity | Typical use |
|---|---|---|
| USEND / URCV (SFB 8 / SFB 9) | Best effort, may be overwritten by next message | High-rate cyclic data, alarms, where latest value is what matters. |
| BSEND / BRCV (SFB 12 / SFB 13) | Segmented, acknowledged; receiver sets DONE | Recipe downloads, large setpoint tables, audit logs. |
S7-1200/1500 do not expose USEND/URCV in the system library. Use BSEND/BRCV (TSEND_C / TRCV_C in some scenarios) instead, or drop down to PUT/GET for simpler cases.
BSEND / BRCV Sequence
- Sender sets
REQwithID,R_ID,LEN,SD_ipopulated. - BSEND segments the data and waits for the receiver to acknowledge each segment.
- Receiver's BRCV consumes the segments; on full transfer
DONErises for one scan. - Application reads the receive DB; it must finish before the next job with the same
R_IDarrives.
R_ID while the first is still in flight. STATUS W#16#80A1 (partner busy) is raised. Let the first job complete or cancel it by reinitialising the instance.Global Data (GD) Communication on MPI
Global Data is a broadcast-style service that runs over the MPI subnet and is configured entirely in STEP 7 V5.x. There is no code to write: you select which tags each CPU contributes to a GD circle, and STEP 7 manages the sending and receiving at the configured scan rate. GD is limited to SIMATIC stations with an MPI or PROFIBUS interface and is rarely used on new PROFINET-only projects, but remains useful when retrofitting an existing line where the topology is fixed.
| Resource | S7-300 | S7-400 |
|---|---|---|
| GD circles per CPU | 4 | 16 |
| Max bytes per GD packet | 22 | 54 |
| Max stations on the GD subnet | 15 | 15 |
| Transport | MPI (and PROFIBUS on supported CPUs) | MPI / PROFIBUS |
| Programming | None | None |
GD Configuration in Simatic Manager
- Open the project and double-click Global Data in the MPI subnet object.
- Drag the source tags from each CPU into the GD table; STEP 7 builds the senders and receivers automatically.
- Set the scan rate for each GD circle (1 to 255 multiples of the CPU cycle). Slower cycles reduce bus load.
- Compile and download the GD configuration to all participating CPUs.
GD does not require code in OB 1, but the receiving CPU must allocate the matching DBs or M areas before download. If a tag is not present in the partner, the GD circle fails at startup with a SF LED and a diagnostic buffer entry referencing the missing address.
PROFINET I-Device and PN/PN Coupler
PROFINET exposes two deterministic mechanisms for CPU-to-CPU exchange:
- I-Device – a PROFINET device that provides an upper-level interface to a PROFINET controller, so two S7 CPUs can exchange process data over Ethernet. No proprietary S7 connection is needed; the data is part of the IO image.
- PN/PN coupler – a hardware module that bridges two PROFINET subnets, translating IO data between them. Useful when the two CPUs are on physically separate networks.
Configuring an I-Device in TIA Portal
- Select the CPU in the device tree and enable the I-Device mode in the PROFINET interface properties.
- Add the slots to be exposed (inputs and outputs) to the transfer area.
- Compile and download the I-Device project to the lower-level CPU.
- Import the I-Device GSD file into the upper-level controller's project and add it as a PROFINET device.
- Map the slots in the upper-level CPU's IO image; access them with the standard
%IW/%QWsyntax.
PROFINET I-Device transfers are deterministic and cyclic, so they are preferred for motion, interlock, and safety-related exchange. A typical update time is 1 to 4 ms; the configured value appears in the device properties of the upper controller.
NetPro and TIA Portal Configuration Walk-Through
STEP 7 V5.x / NetPro
- Insert the two S7 stations and the network (MPI or PROFIBUS).
- Open NetPro. Select the CPU on the first station and right-click the partner; choose Insert New Connection.
- Pick S7 Connection and confirm the partner. The local connection ID is auto-assigned; record it for the block call.
- Set Active connection establishment on the partner if GET / PUT are only run from one side.
- Compile and download the hardware configuration to both CPUs.
- Insert the GET / PUT / BSEND / BRCV blocks in OB 1 of the active CPU; enter the connection ID at the
IDinput.
TIA Portal / Devices & Networks
- Add both S7-1200/1500 devices and connect their PROFINET interfaces to the same subnet.
- On Device A, open the Connections editor and add a new S7 connection to Device B.
- Accept the auto-assigned local connection ID. Set the partner as server if the partner is not actively initiating.
- Compile both devices and download the hardware configuration to both CPUs.
- Insert PUT / GET blocks in the program of Device A; enter the connection ID at the
IDinput.
Connection Resources and Capacity Planning
Before adding a fourth or fifth peer-to-peer exchange, review the connection budget of every CPU in the network. The CPU's technical data sheet states the maximum number of S7 connections; each open connection (PG, HMI, OPC UA server, peer CPU) consumes one slot. The relationship is:
Free connections = Max connections − (HMI panels) − (PG/PC) − (other S7 connections) − (OPC UA / Open User Communication endpoints)
When the budget is exhausted, the CPU rejects new connections with a diagnostic buffer entry "No resources for connection" and the new GET / PUT call returns STATUS W#16#8090. The fix is to either upgrade the CPU to a higher-spec variant, consolidate multiple HMI panels behind a router panel, or migrate to PROFINET I-Device and reduce the number of S7 connections used.
| CPU | Total S7 connection resources | Reserved for PG / HMI / OPC | Available for peer-to-peer |
|---|---|---|---|
| CPU 1214C DC/DC/DC | 8 | 1 PG + 2 HMI = 3 | 5 |
| CPU 1515-2 PN | 128 | 1 PG + 3 HMI + 1 OPC UA = 5 | 123 |
| CPU 315-2 PN/DP | 14 | 1 PG + 2 HMI = 3 | 11 |
| CPU 416-3 PN/DP | 64 | 1 PG + 4 HMI = 5 | 59 |
Watchdog and Timeout Recommendations
Each S7 connection has a keep-alive and a connection-monitoring timer. If the partner CPU does not respond within the configured time, the connection is torn down and the next GET / PUT returns STATUS W#16#80F0. Recommended values for a 1 Hz polling cycle:
- Keep-alive: 30 s (default; leave at default unless bus load is high).
- Connection monitoring: 100 s (default).
-
Block watchdog: implement in the application by validating
NDR/DONEagainst a time-stamp; if the data is older than 3 × the polling period, mark the value as "stale" in the HMI.
To avoid losing the first few polls after a CPU restart, the receiving side should clear its local copy of the data on an OB 100 / startup pass and only mark it as "valid" after the first successful NDR arrives.
Diagnostics and Verification
- Online » Accessible Nodes – confirm both CPUs are visible from the PG and that the network interface is the expected one (MPI / PROFIBUS / PROFINET).
- Online » Diagnostics » Connection – NetPro and TIA Portal both expose a connection table that shows the configured S7 connections, their state, and the last error.
-
Watch the block instance – open the instance DB of the GET / PUT block in online view; check
STATUSon the rising edge of the next call. - Forcing a controlled fault – stop the partner CPU to confirm the call returns STATUS W#16#80A0 (negative acknowledgement) rather than hanging the application.
-
Data age tag – in the receiver, expose the timestamp of the last successful
NDRas an HMI tag; a stale value indicates a silent communication break.
Troubleshooting Matrix
| Symptom | Likely cause | Diagnostic step | Fix |
|---|---|---|---|
| STATUS W#16#8090 immediately on every call | S7 connection not downloaded or partner CPU not in RUN | NetPro / TIA connection table shows "Not established" | Compile and download the connection to both CPUs; check partner mode selector |
| STATUS W#16#80A0 on PUT, partner SF LED | Partner CPU is in STOP or DB missing | Open partner diagnostic buffer | Start the partner, create the target DB with matching size |
| STATUS W#16#80B0 | Data area out of range in partner | Check ADDR_i byte count vs partner DB length | Shrink payload or extend partner DB |
| Connection established but data never updates | Wrong local connection ID at the block call | Cross-check ID in NetPro vs ID in block call | Update the block's ID input |
| Data updates for a few minutes, then freezes | Connection resource exhaustion | Diagnostic buffer: "no resources for new connection" | Reduce HMI/OPC connections, upgrade CPU, consolidate peer traffic |
| Stale data on HMI after partner CPU restart | Receiver holds last value across a connection break | Force a value watch; observe after partner restart | Reset receive DB on OB 100; mark data valid only on NDR |
| PROFINET I-Device not detected by upper controller | GSD not imported, wrong slot count | Upper controller device catalog / device view | Re-import the I-Device GSD; verify slot configuration |
| GD table compiles but circle is in error | Mismatched DB or missing data block in one of the stations | Diagnostic buffer of the failing CPU | Create the referenced DB in every participating CPU |
Selecting the Right Method for a New Project
For a greenfield PROFINET-only system, default to PROFINET I-Device between S7-1500 / S7-1200 controllers where determinism matters, and reserve PUT / GET for commissioning and non-critical diagnostics. For a brownfield S7-300 / S7-400 line with an existing MPI ring, GD is the lowest-cost option for low-rate broadcasting between stations. For point-to-point exchange with one side initiating, GET / PUT is the lowest-code path and is portable across generations. For event-driven or large-block transfer, BSEND / BRCV remains the most robust both-sided handshake.
Field-Commissioning Checklist
- Download the S7 connection (NetPro / TIA) to both endpoints.
- Verify the connection in the online diagnostics view: state should be "established".
- Place PUT / GET (or BSEND / BRCV) blocks in the right OB and assign a unique instance DB to each call.
- Drive
REQfrom a controlled edge detector to avoid flooding the connection. - Wire a status watch on the HMI to expose
ERROR,STATUS, and a data-age tag. - Force a controlled fault: stop the partner, confirm STATUS W#16#80A0, restart, confirm
NDRresumes. - Document the connection IDs and partner roles in the project header block.
FAQ
What is the difference between GET/PUT and Send/Receive in S7 communication?
GET/PUT is single-sided: only the initiating CPU runs a block, and the partner does not require program code. Send/Receive (USEND/URCV or BSEND/BRCV) is both-sided: the partner must also call the matching receive block to acknowledge or consume the data. Use GET/PUT for one-way polling, Send/Receive for event-driven handshakes and large bulk transfers.
How many S7 connections does an S7-1200 support for peer-to-peer exchange?
It depends on the CPU model. CPU 1211C supports 3 connections, CPU 1214C supports 8, and CPU 1215C / 1217C support up to 14. Subtract connections reserved for PG, HMI, and OPC UA; the remainder is available for GET/PUT or Send/Receive peer traffic. Refer to the CPU's data sheet for the exact number.
Can I use PROFINET I-Device to exchange data between two S7-1200 controllers?
Yes. Configure the lower-level S7-1200 as an I-Device, expose the required slots as inputs and outputs, and import the I-Device GSD into the upper-level S7-1200 project. The upper-level CPU then reads the I-Device data from its standard PROFINET IO image (e.g. %IW) with a configurable update time of 1 to 4 ms.
Why does my GET call return STATUS W#16#8090 even though the connection is configured?
STATUS W#16#8090 means the S7 connection is not established at runtime. Check that the connection was downloaded to both CPUs, that neither CPU is in STOP, and that at least one partner is marked as the active connection endpoint in NetPro / TIA Portal. Also verify that the partner has free connection resources.
What are the limits of Global Data (GD) on MPI?
An S7-300 supports up to 4 GD circles with a maximum of 22 bytes per packet, and an S7-400 supports up to 16 GD circles with a maximum of 54 bytes per packet. Up to 15 S7 stations can share a single MPI subnet for GD. There is no program code required, but every participating CPU must have the referenced data block present at download time or the GD circle will fail.