TIA Portal PUT Instruction: S7-1200 to S7-1500 Data Transfer

David Krause12 min read
SiemensTIA PortalTutorial / 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

1. Overview: S7 Communication with the PUT Instruction

The PUT instruction is part of the S7 communication base block set in TIA Portal and is used to write data from one SIMATIC CPU to a partner CPU on the same Industrial Ethernet subnet. In the typical scenario covered here, an S7-1200 acts as the active (client) side and writes 11 REAL values from a local data block into a matching data block on a remote S7-1500 server. The reverse direction is normally handled with the GET instruction.

Per the official Siemens TIA Portal help, PUT writes data to a remote CPU and is started on a positive edge at the REQ control input (PUT: Write data to a remote CPU). The function block resides in the Instructions > Communication > S7 Communication palette and ships with every CPU firmware that supports S7 communication. The PUT block was carried forward into the S7-1200 G2 line, so the same parameterization applies to S7-1200, S7-1500, and S7-1200 G2 CPUs that all run on a unified TIA Portal project platform.

For 11 REAL values the data footprint is fixed:

  • 1 REAL = 32 bits = 4 bytes
  • 11 REAL = 11 × 4 = 44 bytes
  • Pointer length field on ADDR_1 = 44 (Byte)

The 44-byte payload is well below the maximum S7 PUT/GET payload of 462 bytes per call on a single ADDR_x reference, so no segmentation is required.

2. Prerequisites

Before programming the PUT block, validate the following hardware and software prerequisites. Missing any of these items is the most common cause of an apparently correct configuration that still produces an error on STATUS.

Requirement Detail Verification
TIA Portal version V16 or newer recommended; S7-1500 must be in a TIA Portal version that supports the CPU's firmware Project > Properties > Portal version
S7-1200 firmware V4.0 or newer (V4.2+ for optimized block features) Online & diagnostics > CPU information
S7-1500 firmware V1.8 minimum, V2.5+ recommended Online & diagnostics > CPU information
IP addressing Both CPUs on the same subnet, e.g. S7-1200 = 192.168.0.10, S7-1500 = 192.168.0.20, mask 255.255.255.0 Device & networks > PROFINET interface
PUT/GET access Permitted on both CPUs Device configuration > Properties > Protection & Security > Connection mechanisms
Data block access Both DBs configured for Standard block access (not optimized) DB > Properties > Attributes > Optimized block access = unchecked
Hardware configuration consistent No compilation errors in either station Compile > Hardware (rebuild all)
Note: The Permit access with PUT/GET communication partner checkbox must be set on BOTH CPUs. If it is set on the S7-1200 client but not on the S7-1500 server, the call returns STATUS = 0x0001 (Communication error) without writing data. This is the single most frequent configuration error in PUT/GET projects.

3. Establishing the S7 Connection

An S7 connection is the dedicated transport channel used by PUT/GET. There are two valid ways to create one in TIA Portal.

3.1 Single-project setup (both CPUs in the same project)

  1. Open Devices & networks in the S7-1200 station.
  2. Drag the S7-1500 from the project tree into the network view if it is not already present.
  3. Click the PROFINET port of the S7-1200, drag a connection line to the PROFINET port of the S7-1500, and select S7 connection from the drop-down list. TIA Portal creates an unconfigured S7 connection.
  4. Right-click the connection > Properties > General. Verify the local ID (e.g. 100), the partner IP, and the partner rack/slot.

3.2 Two-project setup (CPUs in separate projects)

  1. On the S7-1200 side, open Devices & networks > Connections.
  2. Choose Add new connection > S7 connection. Set the partner to Unspecified.
  3. Enter the remote IP, the remote rack/slot, and leave Establish an active connection enabled (default for the client).
  4. Note the connection ID (e.g. ID = 100). This value is what the PUT block's ID input must reference.
Best practice: A configured S7 connection (single project) is preferred when possible because the connection diagnostics are integrated into TIA Portal's online view. The unspecified partner variant still works but provides no online diagnostics for the partner side.

4. Adding the PUT Instruction

Open the S7-1200 program block where the data transfer should be triggered (OB1 is acceptable for a periodic trigger; an event-driven OB is preferred for production).

  1. Right-click in the program editor > Insert new instruction.
  2. Navigate to Communication > S7 Communication > PUT.
  3. Drop the PUT block into a network.
  4. TIA Portal will auto-generate a background DB (e.g. PUT_DB) for the instance.

The PUT block exposes the following standard interface per the official TIA Portal help (PUT: Set parameters for write and send area):

Input Data type Meaning
REQ BOOL Start the job on a positive edge
ID WORD S7 connection ID from the network view (e.g. W#16#64 = 100 decimal)
DONE BOOL Job completed without error (one cycle)
ERROR BOOL Job completed with error (one cycle)
STATUS WORD Detailed return code
SD_1 VARIANT Local source area (e.g. P#DB100.DBX0.0 BYTE 44)
ADDR_1 VARIANT Remote destination area (e.g. P#DB300.DBX0.0 BYTE 44)
LEN_1 WORD Length of the data in bits/bytes; for byte-oriented access = number of bytes
SID_1 WORD Security / sub-ID; can be left at default 0 for non-secure S7
Important: When the data layout fits in a single ADDR_x range, only SD_1, ADDR_1, and LEN_1 are needed. The SD_2..4 / ADDR_2..4 variants are used for segmented transfers of larger payloads.

5. ADDR_1 Pointer Format Explained

The ADDR_1 parameter is the single most misconfigured element in the PUT call. It is a pointer to a remote data area, expressed with the Any-pointer syntax P#DB<number>.DBX<byte>.<bit> BYTE <length>. It does not specify the local source — that is the job of SD_1.

5.1 Pointer syntax table

Field Syntax Example (this project) Meaning
Source pointer P#<DB>.DBX<B>.<b> BYTE <L> P#DB100.DBX0.0 BYTE 44 Local S7-1200 DB100, starting at byte 0, 44 bytes long
Destination pointer P#<DB>.DBX<B>.<b> BYTE <L> P#DB300.DBX0.0 BYTE 44 Remote S7-1500 DB300, starting at byte 0, 44 bytes long
Length unit BYTE / WORD / DWORD BYTE Use BYTE for byte-granular areas, WORD for MW/IW, DWORD for MD/ID
Bit offset 0..7 0 Always 0 when the area is byte-aligned and the unit is BYTE

5.2 Worked example for the 11-REAL transfer

To send 11 REAL from S7-1200 DB100 starting at byte offset 0 to S7-1500 DB300 starting at byte offset 0:

// ADDR_1 (remote destination)
P#DB300.DBX0.0 BYTE 44

// SD_1 (local source)
P#DB100.DBX0.0 BYTE 44

// LEN_1
WORD#16#002C   // 0x002C = 44 decimal

// ID (S7 connection ID)
WORD#16#0064   // 0x0064 = 100 decimal, must match the connection in the network view

If the 11 REAL values start at byte offset 16 in DB100 and must land at offset 32 in DB300:

// SD_1
P#DB100.DBX16.0 BYTE 44

// ADDR_1
P#DB300.DBX32.0 BYTE 44

The length stays at 44 because the payload size is fixed by the data type, not the offsets.

5.3 Why the pointer is required even for DBs

The PUT block transfers raw bytes. It does not interpret symbolic names, so the destination area must be described by its absolute memory address. TIA Portal will accept a symbolic reference in ADDR_1 only if the symbol is fully resolved at compile time; using the explicit P#DB300... form avoids any symbol resolution edge case and is the recommended method.

6. Configuring the Data Blocks for Standard Access

PUT/GET access on an S7-1500 requires that the destination data block is not an optimized block. On an S7-1200, the source DB may be optimized if and only if the call uses a fully qualified symbolic reference that the compiler can resolve. For maximum portability, configure both DBs as standard.

  1. Open the DB in the project tree.
  2. Right-click Properties > Attributes.
  3. Uncheck Optimized block access.
  4. Confirm with OK and recompile the project.

After this change, the DB shows a strict byte layout in the Offset column. Use the offsets shown in the Offset column of the DB editor as the basis for the ADDR_1 byte offset.

Caution: Toggling the optimized attribute invalidates any previously downloaded DB instance. Re-download the hardware configuration to the S7-1500 after toggling optimized access, or the runtime will continue to use the old instance.

7. Permitting PUT/GET Access on the S7-1500

This is the configuration that the source author initially missed and the reason the remote DB did not receive any data.

  1. Open the S7-1500 device configuration.
  2. Select the CPU > Properties > Protection & Security.
  3. Scroll to Connection mechanisms.
  4. Check Permit access with PUT/GET communication partner.
  5. Compile and download the new hardware configuration to the S7-1500.

Repeat the same on the S7-1200. Without this flag the S7-1500 rejects incoming PUT jobs at the communication layer and the client receives a non-zero STATUS value.

8. Triggering the PUT Job and Evaluating Status

The PUT job executes once per rising edge of REQ. The output flags DONE, ERROR, and STATUS are valid for exactly one cycle after the call completes. The STATUS output follows the standard SFB/FB return-code convention:

STATUS (hex) Meaning Typical cause
0x0000 No error —
0x0001 Communication error PUT/GET not permitted on partner, wrong IP, wrong rack/slot
0x0081 Destination area illegal ADDR_1 pointer malformed, DB does not exist on partner, or length is zero
0x0082 Source area illegal SD_1 pointer malformed or local DB does not exist
0x0083 DB not loaded on partner DB300 has not been downloaded to the S7-1500
0x0084 / 0x0085 Access conflict on partner Partner is using the same area concurrently with another communication block
0x8001 Internal error, e.g. resource exhaustion Too many active communication jobs in parallel

A typical ladder-style implementation that latches REQ until the job finishes:

// SCL example in OB1
IF "StartTransfer" THEN
    "PUT_DB".REQ := TRUE;
    IF "PUT_DB".DONE OR "PUT_DB".ERROR THEN
        "PUT_DB".REQ := FALSE;
        // copy STATUS somewhere visible if needed
    END_IF;
END_IF;

"PUT_DB".ID   := WORD#16#0064;   // connection ID 100
"PUT_DB".SD_1 := P#DB100.DBX0.0 BYTE 44;
"PUT_DB".ADDR_1 := P#DB300.DBX0.0 BYTE 44;
"PUT_DB".LEN_1 := WORD#16#002C;  // 44 bytes
"PUT_DB"();
Important: The PUT block must be called every cycle. TIA Portal only evaluates REQ on a cycle in which the FB is called, so omitting the call effectively disables the transfer.

9. Troubleshooting Matrix

Symptom Likely cause Resolution
No data arrives on S7-1500, no error REQ never receives a rising edge Force REQ in a watch table, confirm positive-edge logic
STATUS = 0x0001 immediately PUT/GET permission not set on the S7-1500 Enable Permit access with PUT/GET communication partner and re-download HWCN
STATUS = 0x0081 ADDR_1 points to a non-existent DB or wrong length Verify DB300 exists on the S7-1500 and the byte length matches the actual data size
STATUS = 0x0083 DB300 not loaded on partner Download DB300 to the S7-1500 in Download to device mode
Partial data written LEN_1 or ADDR_1 length smaller than SD_1 length Set LEN_1 = length in SD_1 in bytes
No connection in network view S7 connection not created Add an S7 connection in the network view and note the connection ID
STATUS = 0x8001 over time Connection resource exhaustion Ensure the same connection ID is reused and not duplicated in the project
Values arrive but are corrupted Different byte order or different REAL encoding Verify both CPUs are little-endian; the S7 family uses little-endian by default, so this should match
PUT/GET permission toggled but still failing Old HWCN active in the CPU Stop the S7-1500, perform a full download, and re-run
Variable names lost on partner DB Optimized access toggled after symbolic HMI tags assigned Re-export HMI tags or keep both DBs optimized with symbolic PUT calls

10. Verification Procedure

  1. Compile both stations with Compile > Hardware and software (rebuild all). Resolve all errors and warnings.
  2. Download the S7-1200 project first, then the S7-1500 project.
  3. Open a watch table on the S7-1200 containing PUT_DB.REQ, PUT_DB.DONE, PUT_DB.ERROR, PUT_DB.STATUS.
  4. Force PUT_DB.REQ = TRUE and observe STATUS = 0x0000 within one cycle.
  5. Open a watch table on the S7-1500 against DB300 and confirm the 11 REAL values match the source.
  6. Use Online & diagnostics > Connections on the S7-1500 to confirm an active S7 connection from the S7-1200 IP.
  7. If any values are wrong, repeat the cycle but set PUT_DB.Monitor = TRUE to read the actual SD_1/ADDR_1 pointers in the instance DB and compare to the configuration.

11. Performance and Design Notes

The PUT call is non-blocking. The job is dispatched on the edge of REQ and DONE/ERROR/STATUS report the result on the next call cycle. Typical cycle for a 44-byte PUT on a 100 Mbit/s PROFINET segment is 5 to 15 ms. The block does not consume CPU execution time while waiting — it relies on the S7 communication scheduler.

For repeated periodic transfers, a cyclic OB (e.g. OB35) is preferred over OB1 to keep the trigger deterministic. For event-driven transfers (e.g. after a measurement), latch the trigger in a flag and reset it on DONE.

If the S7-1200 needs to receive data from the S7-1500 in addition, add a second S7 connection (or reuse the same connection) and call GET on the S7-1200 with a similar pointer configuration pointing at the remote source.

FAQ

What pointer syntax do I use for ADDR_1 when sending 11 REAL values from a S7-1200 to a S7-1500?

Use the Any-pointer format P#DB300.DBX0.0 BYTE 44 in ADDR_1, with SD_1 set to P#DB100.DBX0.0 BYTE 44 on the source. The length is 44 bytes because each REAL is 4 bytes (11 × 4 = 44). Set LEN_1 to WORD#16#002C (44 decimal) and ID to the S7 connection ID from the network view.

Do both data blocks have to use standard (non-optimized) access for PUT/GET?

Yes, the destination DB on the S7-1500 must be configured with optimized block access disabled. The source DB on the S7-1200 can remain optimized only when the call uses a fully resolved symbolic reference; for portable pointer-based calls, also configure it as standard. Toggle the attribute under DB > Properties > Attributes and re-download the hardware configuration.

Why does PUT return STATUS 0x0001 with no data written?

STATUS 0x0001 indicates a communication error. The most common cause is that the Permit access with PUT/GET communication partner option is not enabled on the S7-1500, or the S7 connection has the wrong partner IP, rack, or slot. Enable the option on both CPUs, recompile, and re-download the hardware configuration.

Do I need to add the S7-1500 into the S7-1200 project for PUT to work?

No, PUT works with an unspecified partner as long as an S7 connection is created in the S7-1200's network view with the partner IP and rack/slot filled in. Adding the S7-1500 as a device in the same project is convenient for diagnostics but not required. Both CPUs must have PUT/GET access permitted.

What is the maximum payload per PUT call?

A single PUT call can transfer up to 462 bytes through one ADDR_x reference. For larger transfers, segment the data across SD_2..4 and ADDR_2..4. The 44-byte payload in this scenario is well within the single-call limit, so only SD_1, ADDR_1, and LEN_1 are needed.

Back to blog