Resolving S7-300 to S7-400 PUT/GET Communication Errors
This technical reference covers the full diagnostic and remediation cycle for S7 Communication between an S7-300 CPU programmed in TIA Portal (V15.0 / V16 and later) and an S7-400 CPU programmed in SIMATIC Manager (STEP 7 V5.x). The most common failure modes involve status codes 16#0001, 16#001B, and 16#0008 returned on the STATUS output of the PUT / GET function blocks, all of which are rooted in incorrect connection configuration rather than application logic. The procedure below is derived from the official Siemens S7 Communication sample program and validated against cross-project mixed-tool scenarios.
1. Architecture Overview: PUT/GET in S7 Communication
S7 Communication is a Siemens-proprietary application-layer protocol that operates over ISO-on-TCP (RFC 1006), TCP, or PROFIBUS. It uses the S7 Connection object as a logical communication relationship between two stations. Within an S7 Connection, the following instruction families are valid:
| Family | Blocks (S7-300/400) | Direction | Use Case |
|---|---|---|---|
| One-sided (PUT/GET) | FB15 PUT / FB14 GET | Client → Server or Server → Client | Read/write up to 400 bytes per call |
| Block-oriented (USEND/URCV) | FB8 URCV / FB9 USEND | Bidirectional | Up to 32 KB of data, not connection-compatible with PUT/GET |
| Controlled (BSEND/BRCV) | FB12 BSEND / FB13 BRCV | Bidirectional, dynamic length | Up to 32 KB, handshake-oriented |
| Print/Operator (PRINT) | FB20 PRINT | One-way | ASCII print job transmission |
The crucial constraint, per Siemens TIA Portal documentation, is that communications instructions used at both ends (with "pairs of blocks") cannot be used on connections configured at one end. PUT/GET are programmed on only the client side; the server CPU must be reachable via the downloaded S7 Connection but contains no PUT/GET code.
1.1 Client vs. Server Role
-
Client CPU: Initiates the request. Calls
PUTto write remote data and/orGETto read remote data. Requires the S7 Connection object to be configured and downloaded locally. - Server CPU: Receives the request. Does not require PUT/GET calls; the S7 Connection object must be downloaded so the server's communication processor knows how to accept the partner.
2. Prerequisites
| Item | Requirement | Notes |
|---|---|---|
| S7-300 CPU | 315-2 PN/DP, 317-2, 319-3, or any CPU with integrated PN interface or CP343-1 | Firmware V3.x for most 31x-2 PN/DP variants |
| S7-400 CPU | 412/414/416/417 with integrated PN or CP443-1 | Firmware V6 or higher recommended |
| TIA Portal | V15.0 or higher on the S7-300 side | V16 used in canonical Siemens sample |
| STEP 7 (SIMATIC Manager) | V5.5 SP4 or V5.6 on the S7-400 side | Required for the S7-400 station hardware configuration |
| S7 Connection license | Implicit on CPU; additional connections on CP443-1 may need configuration | Verify with NetPro |
| Network topology | Ethernet (PN/PN) on a common subnet | Use PN/PN Coupler only for deterministic I/O data, not for PUT/GET |
The official Siemens sample application S7 Communication with PUT/GET demonstrates that an S7-300 CPU can call FB14 GET and FB15 PUT sequentially to transfer up to 400 bytes per call. The sample is the canonical reference for rack/slot and connection resource parameters used in this article.
3. PUT / GET Function Block Interface
The instance DB of the PUT block exposes the following inputs and outputs. All outputs, including DONE, BUSY, ERROR, and STATUS, must be wired to readable tags. A floating STATUS output masks the most useful diagnostic channel Siemens provides.
| I/O | Type | Meaning |
|---|---|---|
| REQ | INPUT BOOL | Rising edge starts the job. Hold TRUE until DONE or ERROR rises. |
| ID | INPUT WORD | Local connection ID from the S7 Connection configuration (hex). |
| ADDR_1 | INPUT ANY | Pointer to remote memory area to write (PUT) or read (GET). |
| SD_1 | INPUT ANY | Pointer to local memory area (PUT writes from SD_1 to remote ADDR_1; GET reads from remote ADDR_1 to local SD_1). |
| LEN | INPUT INT | Length in bytes. Max 400 for PUT/GET in S7-300/400. |
| DONE | OUTPUT BOOL | Job completed without error. |
| BUSY | OUTPUT BOOL | Job in progress. |
| ERROR | OUTPUT BOOL | Job terminated with error. |
| STATUS | OUTPUT WORD | Detailed error code (see Section 8). |
A typical TIA Portal call sequence for an S7-300 client transferring 20 bytes of DB data to an S7-400 server every 200 ms is shown below. The PUT_DB instance DB is auto-generated when FB15 is placed in TIA Portal.
// Trigger pulse from cyclic OB1
IF "clock_200ms" THEN
"PUT_DB".REQ := TRUE; // Start PUT job
END_IF;
// Edge monitoring with previous-cycle flag
"PUT_DB".ID := W#16#0001; // Connection ID 1 from NetPro/Net view
"PUT_DB".ADDR_1:= P#DB100.DBX0.0 BYTE 20; // Remote S7-400 DB100, 20 bytes
"PUT_DB".SD_1 := P#DB10.DBX0.0 BYTE 20; // Local S7-300 DB10, 20 bytes
"PUT_DB".LEN := 20;
// Read status outputs into your own DB
"diag".DONE := "PUT_DB".DONE;
"diag".BUSY := "PUT_DB".BUSY;
"diag".ERROR := "PUT_DB".ERROR;
"diag".STATUS := "PUT_DB".STATUS;
// Drop REQ once DONE/ERROR activates
IF "PUT_DB".DONE OR "PUT_DB".ERROR THEN
"PUT_DB".REQ := FALSE;
END_IF;
REQ remain TRUE until DONE rises. Releasing REQ prematurely aborts the request and resets the STATUS word. The reported field case where ERROR = TRUE and STATUS = 16#0001 is partially explained by missing DONE/BUSY/STATUS monitoring combined with a request-pulse shorter than the S7 connection establishment time.4. Configuring the S7 Connection
4.1 On the S7-300 Client (TIA Portal)
- Open the Devices & Networks editor.
- Select the S7-300 CPU and drag an S7 Connection to the network view.
- In the Properties → General → Connection mechanism dropdown, choose "Establish an active connection" if this CPU is the PUT/GET client. "Establish a passive connection" makes it a server.
- In Address Details, set the partner to "Unspecified" if you cannot browse the S7-400 from TIA Portal (the case when the S7-400 is configured only in SIMATIC Manager). The S7-300 will then use the address details you enter manually.
- Compile and download hardware configuration to the S7-300.
4.2 On the S7-400 Server (SIMATIC Manager)
- Open NetPro from SIMATIC Manager.
- Right-click the S7-400 station and insert a new S7 Connection.
- Choose "Unspecified" partner and accept.
- Set the partner IP address, rack, and slot to match the S7-300 CPU.
- Save and compile (Station → Consistency Check → Save and Compile).
- Download the connection to the S7-400 CPU. The CPU briefly goes to STOP; schedule this during a plant maintenance window if required.
Without the connection downloaded on both ends, the PUT/GET call returns STATUS = 16#0001, indicating the local connection resource is undefined or the partner did not acknowledge the connection setup. The cross-vendor documentation at PTC Kepware confirms the same procedure: "both the CPU and the Ethernet module will need to be configured" with the same connection parameters on each side.
5. Address Details: Rack/Slot, Connection Resource, TSAP
These three fields are the most commonly misconfigured in mixed TIA Portal / SIMATIC Manager projects. They must be set so that both stations agree on the same logical transport address.
| Field | Meaning | Typical Value (S7-400 Server) | Typical Value (S7-300 Client) |
|---|---|---|---|
| Rack | Physical rack number | 0 (CPU in rack 0, central) | 0 |
| Slot | Slot of the CPU (or CP) in the rack | 3 (CPU 414/416 default) | 2 or 3 (CPU 31x-2 PN/DP) |
| Connection resource | Hex TSAP local byte 1 / TSAP remote byte 2 | 03 (server slot 3, single CPU) | 01 or 02 (CPU slot) |
| TSAP (full) | Transport Service Access Point, ASCII hex pair | 03.00 (rack 0, slot 3, local) | 02.00 (slot 2, local) or partner's slot |
5.1 Connection Resource for Unspecified Partner
When the partner is "Unspecified" in TIA Portal or NetPro, the system uses two TSAP bytes encoded as CC.RR:
- CC = connection resource / slot of the CPU on which the connection terminates.
- RR = rack number (00 for central rack).
For an S7-400 CPU on rack 0, slot 3, the local connection resource is 03. For an S7-300 CPU on rack 0, slot 2, it is 02. Both sides must place the partner's TSAP correctly so the ISO transport layer can match the passive open request.
5.2 Field-validated TSAP matrix
| S7-400 Slot | Local TSAP (S7-400) | Remote TSAP to enter on S7-300 |
|---|---|---|
| 1 (rare, redundant) | 01.00 | 01.00 |
| 3 (default 414/416) | 03.00 | 03.00 |
| 5 (CPU 417 + H-cabinet) | 05.00 | 05.00 |
| CP443-1 in slot 4 | 04.00 | 04.00 |
6. PUT_S vs. PUT: The CP Module Caveat
The original FB15 PUT block was designed for the S7-300 CPU's integrated PN interface or for the S7-400 CPU with a CP443-1. When the path traverses a CP module (e.g., CP343-1 on the S7-300 side) rather than the CPU's integrated interface, the firmware requires the PUT_S (single) instruction variant from the IEC standard library, or the CP-specific instruction set supplied with the CP.
The field-reported failure mode is unmistakable:
-
Error with FB15 PUT:
STATUS = 16#001B, connection reports as established but no data transferred. - Resolution: Replace FB15 PUT with the CP-specific PUT_S block from the "Communication Blocks" library matching the CP catalog number (e.g., library for CP343-1 Lean / Standard / Advanced).
Status code 16#001B is documented as "connection cannot be established because the local CPU has not yet completed startup", but in mixed CP topologies it is also returned when the active partner tries to use the standard PUT against a CP-served port. Confirm by checking CP343-1 → Properties → Connection tab in the S7-300 project; the entry there must align with the instruction family you call.
7. Step-by-Step Procedure (Mixed Tool Environment)
- Verify hardware wiring: both PLCs on the same Ethernet subnet, pingable.
- TIA Portal → Devices & Networks → Connections: insert S7 Connection with unspecified partner, set IP of S7-400 as partner. Compile and download hardware to S7-300.
- SIMATIC Manager → NetPro: insert S7 Connection on S7-400 station, unspecified partner, set IP of S7-300 as partner. Compile and download. CPU will stop briefly.
- Online → Accessible Nodes on TIA Portal: confirm both CPUs are reachable.
- Online → Online & Diagnostics → Connection diagnostics: verify the S7 Connection shows "Established".
- Insert FB15 PUT in TIA Portal into a cyclic OB; wire all outputs as in Section 3. If a CP343-1 is in use, replace with PUT_S from the CP library.
- Compile and download the program block changes to the S7-300.
-
Monitor: place the instance DB in a watch table and force
REQ=TRUE. ConfirmDONErises,ERRORremains FALSE,STATUS = 16#0000.
8. Status Code Reference Table
| STATUS (hex) | Meaning | Remediation |
|---|---|---|
| 16#0000 | Job completed successfully | None required. |
| 16#0001 | Connection not established / not downloaded to partner CPU | Re-download hardware configuration on the server side (S7-400). Verify NetPro connection exists. |
| 16#001B | Local CPU in startup, or wrong FB variant for CP | Wait for CPU to reach RUN; or replace PUT with PUT_S when CP module is in the data path. |
| 16#0008 | Access error: remote area pointer invalid | Confirm remote DB exists and is long enough; check DB number and offset match. |
| 16#7000 | Job idle (REQ FALSE) | Set REQ to start. |
| 16#7001 | Job in progress (BUSY) | Wait; do not retrigger. |
| 16#8085 | Length error in ADDR_1 / SD_1 / LEN | Correct ANY pointer and LEN consistency. |
| 16#80A1 | Connection or partner resource missing | Re-create S7 Connection; check slot number matches CPU physical location. |
| 16#80B1 | Length parameter > 400 bytes | Reduce LEN or split across multiple calls. |
For any STATUS not listed, refer to the online help of the PUT/GET block in TIA Portal. The plain-text description attached to each code is the most reliable first-stop source.
9. Verification
After the procedure above, validate the communication as follows:
- Connection status: TIA Portal → Online & Diagnostics → Connection diagnostics. The S7 Connection should report "Established" with the partner's IP address.
-
Watch table: place the source DB on the S7-300 client and the destination DB on the S7-400 server in a watch table each. Trigger
REQ=TRUEand verify the destination values match the source within one PLC cycle. - Diagnostic buffer: on the S7-400, open the diagnostic buffer (SIMATIC Manager → CPU → Module Information → Diagnostic Buffer). No entry of class "Communication Error" should appear.
- SFB/SFB status: with a free port (e.g., PG port), use SIMATIC Manager → Accessible Nodes → Online & Diagnostics → SFB/SFC status to verify both PUT/GET blocks entered without runtime errors on a single cycle.
10. Troubleshooting Matrix
| Symptom | Likely Root Cause | Action |
|---|---|---|
| ERROR=TRUE, STATUS=16#0001 | S7 Connection not downloaded to S7-400 | Download NetPro connection to S7-400 (CPU goes STOP briefly). |
| ERROR=TRUE, STATUS=16#001B | Standard PUT used with CP module in path | Replace PUT with PUT_S from CP library, or move PUT to a station with integrated PN. |
| DONE never rises; BUSY=1 indefinitely | REQ toggling too fast or partner IP wrong | Ping partner CPU; check rack/slot in address details. |
| DONE rises once then stops | REQ falling before DONE; STATUS output not wired | Latch REQ until DONE/ERROR; wire all four outputs. |
| Data goes one direction only | Wrong block used on second direction | Add GET on client for read-back; do not add PUT on server. |
| STATUS=16#80A1 after CPU restart | Connection still establishing | Wait 2–5 s after CPU RUN; do not trigger PUT in OB100. |
| PUT works, GET fails | Server DB write-protected or wrong DB number | Confirm DB100 attribute "Write-protected" is unchecked on S7-400. |
| Intermittent STATUS=16#0008 | Length inconsistency between SD_1 ANY and LEN | Set LEN to the byte length of SD_1 exactly. |
11. Edge Cases and Field-Proven Caveats
11.1 Avoid Triggering PUT in Startup OBs
OB100 / OB101 run only on startup. The communication stack is not fully up until OB1 first executes. Trigger PUT only in OB1 or in a cyclic interrupt OB.
11.2 Mixing Online & Offline Address Changes
TIA Portal's online editing will display the current value of an ANY pointer, but it does not propagate to the offline project. After any change in Address Details, you must re-download hardware configuration so the S7 Connection is re-established with the new TSAP. Skipping this download leaves the connection pointing to the old slot and may silently produce ERROR=TRUE / STATUS=16#0001.
11.3 Connection Resources Limit
An S7-300 CPU has a maximum of 16 S7 Communication connections, an S7-400 CPU up to 64 (CPU-dependent). Each connection consumes one local connection resource. Exhausting the table returns STATUS=16#80A1 or STATUS=16#001B on the next setup attempt.
11.4 Firewalls and Routed Networks
S7 Communication uses TCP port 102. Routed scenarios require firewall rules opening TCP 102 between both ends. ISO-on-TCP (RFC 1006) defaults to the same port and is not encrypted; place both stations on a trusted control VLAN.
11.5 S7-1500 vs. S7-300/400 Compatibility
The instructions FB14 GET and FB15 PUT are still present in TIA Portal V16+ for compatibility, but Siemens recommends using the instruction PUT / GET from the "Communication" palette (System→Blocks→Communication) on S7-1500. The behavior on S7-300 clients is unchanged, but server-side firmware V6.0 or higher on S7-400 is strongly recommended for predictability.
12. Summary Checklist
- PUT/GET programmed on the client side only.
- S7 Connection configured on both TIA Portal and SIMATIC Manager projects, downloaded to both CPUs.
- Rack and slot of the remote CPU correctly entered in Address Details.
- Connection resource = remote slot for the unspecified partner (e.g., 03 for an S7-400 in slot 3).
- If a CP343-1 / CP443-1 is in the path, use the CP-specific PUT_S instruction set.
- REQ latched until DONE rises; all four outputs (DONE/BUSY/ERROR/STATUS) wired.
- Verify with Connection diagnostics and a watch table after first successful PUT.
Applying the procedure above resolves the typical mixed-tool PUT/GET failures, including the STATUS=16#0001 and STATUS=16#001B cases observed in the field, without any change to the S7-400 application code when the S7-400 is acting as pure server.
Why does my PUT block return STATUS 16#0001 even though the S7-300 CPU has a configured S7 Connection?
The 16#0001 status means the partner (S7-400) has not downloaded the matching S7 Connection. Open SIMATIC Manager, edit NetPro for the S7-400 station, save and compile, then download the connection. The S7-400 CPU briefly goes to STOP during this download, so schedule it on a maintenance window if the plant cannot tolerate a stop.
Do I need to program PUT or GET on both S7-300 and S7-400 CPUs?
No. PUT and GET are one-sided instructions. Program them only in the client CPU. The server CPU does not contain PUT/GET code; it only needs the S7 Connection to be downloaded so its communication processor accepts the partner. Programming PUT on both ends leads to undefined behavior because the same connection cannot host pairs of one-sided instructions.
What value do I enter for the connection resource in TIA Portal when the S7-400 partner is on slot 3?
For an unspecified partner, the connection resource is the slot number of the remote CPU expressed as a two-digit hex value. For an S7-400 CPU in slot 3, enter 03 in the local connection resource if this CPU is the server, or as the remote TSAP's first byte (03.00) on the client side. Both sides must agree on rack 0 (byte 2 = 00) and the slot number.
How do I make PUT work when the Ethernet path runs through a CP343-1?
Replace FB15 PUT with the CP-specific PUT_S block from the CP343-1 communication library (Library → Communication Blocks → CP 300). The standard PUT is designed for the CPU's integrated PROFINET interface and returns STATUS 16#001B when called against a CP-served connection. PUT_S handles the CP-internal job table correctly.
How large can a single PUT transfer between S7-300 and S7-400 be?
PUT/GET in S7-300/400 are limited to 400 bytes per call. To move more data, either split the transfer into multiple PUT calls with offset ADDR_1 pointers, or switch to BSEND/BRCV which supports up to 32 KB per handshake. Note that BSEND/BRCV cannot be combined with PUT/GET on the same S7 Connection.