Configuring PROFINET Communication Between S7-1200 and S7-300/400

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

Overview: PROFINET Between S7-1200 and S7-300/400 PLCs

Connecting a SIMATIC S7-1200 (PROFINET-capable by default on the CPU) to a SIMATIC S7-300 or S7-400 (PROFINET via CPU PN/DP or via CP 343-1 / CP 443-1) is one of the most common migration and brownfield integration tasks. The PROFINET interface is a real-time Ethernet protocol operating at 100 Mbps full-duplex and is shared with standard TCP/IP traffic, allowing S7 communication, TCP, UDP, ISO-on-TCP (RFC1006), and Open User Communication to coexist on the same physical interface.

Because the S7-1200/S7-1500 generation uses optimized data blocks (symbolic, retentive settings, no fixed addressing in the user view) while legacy S7-300/S7-400 use classic absolute addressing, the integration requires explicit attention to DB access mode, byte order, and the connection resource model. Both sides participate as PROFINET IO Devices on the same subnet, but the user-program-level communication is independent of PROFINET IO and is configured through the TIA Portal "Devices & Networks" editor under "Connections."

PROFINET IO and PROFINET-based S7/TCP communication are different functions. PROFINET IO handles distributed I/O (real-time cyclic data exchange). S7/TCP connections handle program-to-program data exchange. The same cable carries both, but the configuration and diagnostics are separate.

Prerequisites

Before configuring the link, verify the following items on both PLC stations:

Item S7-1200 side S7-300/400 side
CPU firmware Firmware 4.0 or later recommended (V4.2+ supports full PUT/GET server). V2.x is limited. S7-300: CPU 31x PN/DP or CPU 31x-2 PN with FW 3.2+. S7-400: CPU 41x PN or CP 443-1 with FW V3.x+.
PROFINET interface Built-in X1 port on every CPU 12xx Built-in PN port on 31x-2 PN / 41x PN, or external CP 343-1 / CP 443-1 in slot 4 / universal slot
TIA Portal V13 SP1 minimum. V15.1 / V16 / V17 / V18 recommended. V20 supports the S7-1200/1500 instruction library natively. STEP 7 V5.5 + HSP or TIA Portal with the matching S7-300/400 HSP for the exact MLFB
Hardware support package Pre-installed for S7-1200 Install the matching HSP via TIA Portal "Options > Support Packages" or import a *.zip HSP
IP addressing plan Pick a static IP per CPU. Avoid DHCP. Same subnet, distinct IP. Set subnet mask consistently (typically 255.255.255.0).
PROFINET device name Required for IO. Optional for pure S7/TCP communication but recommended. Same requirement.

The TIA Portal instruction set for cross-generation communication is documented in the official Siemens instructions reference: Instructions for communication tasks (S7-300, S7-400, S7-1500). This is the canonical reference for PUT/GET, TSEND/TRCV, TUSEND/TURCV, USEND/URCV, BSEND/BRCV, and ISO-on-TCP instruction usage on legacy controllers.

Network Architecture

The simplest topology is two CPUs on a single Ethernet subnet. PROFINET does not require a dedicated switch for two-node point-to-point links, but a managed switch is recommended when scaling beyond two devices, when adding PROFINET IO, or when using MRP redundancy rings.

Station IP address PROFINET name Subnet mask Router
S7-1200 CPU 1214C (master or partner) 192.168.0.10 S71200-PN 255.255.255.0 0.0.0.0
S7-300 CPU 315-2 PN/DP 192.168.0.20 S7300-PN 255.255.255.0 0.0.0.0

If the S7-300 has no built-in PN interface, install a CP 343-1 (e.g., 6GK7343-1EX30-0XE0 for FW V3.x with up to 16 S7 connections) or CP 343-1 Advanced (6GK7343-1GX30-0XE0) in slot 4. S7-400 equivalent is CP 443-1 (6GK7443-1EX20-0XE0) or CP 443-1 Advanced.

TIA Portal Project Setup

  1. Open TIA Portal and create a new project. Use "Project > New" and give it a meaningful name (e.g., "PN_S71200_to_S7300").
  2. Add the S7-1200 first via "Add new device > SIMATIC S7-1200 > CPU > [exact MLFB] > [exact firmware]". Use the same procedure for the S7-300 CPU or for a CP 343-1 inside an S7-300 station.
  3. Open "Devices & Networks" from the project tree. The S7-1200 and the S7-300 each appear as a device.
  4. Switch to "Network view" (top tab). Click the PROFINET port of the S7-1200, hold, and drag to the PROFINET port of the S7-300. A green line indicates a successful connection. This creates a PROFINET subnet automatically.
  5. Right-click the line and choose "Properties > PROFINET subnet" to verify the subnet IP range (e.g., 192.168.0.0/24).
  6. For each station, open "Properties > PROFINET interface > Ethernet addresses" and assign the static IP and PROFINET device name listed in the architecture table.
  7. Save the project. Compile both stations with "Compile > Hardware (rebuild all)".
Always use the exact MLFB and firmware order when adding devices. A 6ES7 315-2EH14-0AB0 with FW V3.0 is a different hardware catalog item than the same MLFB with FW V3.3. Mismatches cause download errors and connection resource warnings.

Selecting the Communication Type

Open "Devices & Networks > Connections" tab. TIA Portal offers the following connection types relevant to this scenario:

Connection type Use case S7-1200 instruction S7-300/400 instruction Direction
S7 connection (PUT/GET) Cyclic or event-driven data exchange of up to 160 bytes per call PUT / GET (server role for GET) PUT / GET (S7-300 FW 3.2+) or SFB/PUT FB Bidirectional (PUT = write, GET = read)
TCP (Open User Communication) Bulk data, custom protocols, integration with non-Siemens devices TCON, TSEND, TRCV, TDISCON FB63 (TCON), FB64 (TSEND), FB65 (TRCV), FB66 (TDISCON) Bidirectional, active or passive partner
ISO-on-TCP (RFC1006) Native Siemens protocol with length field, robust for large payloads (>240 bytes) TCON with connection type 12 (ISOonTCP), TSEND/TRCV FB63/64/65 with IDB type 12, or AG_SEND/AG_RECV Bidirectional
UDP Broadcast or low-overhead publish/subscribe between two nodes TCON type 13, TUSEND, TURCV FB67 (TUSEND), FB68 (TURCV) Connectionless
PROFINET IO Distributed I/O, not user-data exchange n/a (cyclic I/O image) n/a Master-slave IO

For most modernization projects where you need to read a few hundred bytes from an S7-300 and write them into an S7-1200 (or vice versa), the S7 connection with PUT/GET is the lowest-effort option. For payloads >160 bytes or high-frequency streaming, ISO-on-TCP or TCP is preferred.

Configuring an S7 Connection (PUT/GET)

  1. In "Devices & Networks > Connections", click the S7-1200 PROFINET port to select it as the local endpoint, then drag a connection line to the S7-300 PROFINET port. A "Select connection type" dialog appears.
  2. Choose "S7 connection". A connection object is created. Open its properties.
  3. In the properties dialog, verify the local and partner interface, IP, and that "Active connection establishment" is set on the station that initiates the call (typically the one calling PUT/GET).
  4. Note the "Local ID" (connection ID) - it is a hex value used by the PUT/GET blocks. Typical IDs are 1, 2, 3, etc.
  5. Open the S7-1200 program blocks. From "Instructions > Communication > S7 Communication", drag "PUT" and "GET" onto a network.

S7-1200 PUT block (writing to S7-300):

// PUT - write 10 bytes from local DB1 to remote DB10
// Connection ID: 1 (must match the configured S7 connection)
// S7-1200 acts as the active partner
   "PUT_DB".REQ        := TRUE;            // Edge-triggered start
   "PUT_DB".ID         := 1;               // Local connection ID
   "PUT_DB".DONE       := "status".done;   // BOOL, TRUE for one cycle when complete
   "PUT_DB".ERROR      := "status".error;  // BOOL, error flag
   "PUT_DB".STATUS     := "status".status; // WORD, error code if ERROR=TRUE
   "PUT_DB".ADDR_1      := P#DB10.DBX 0.0 BYTE 10; // Remote area (in S7-300)
   "PUT_DB".SD_1       := P#DB1.DBX 0.0 BYTE 10;  // Local source area
   "PUT_DB".LEN        := 10;              // Length in bytes (max 160 for PUT)

S7-1200 GET block (reading from S7-300):

// GET - read 10 bytes from remote DB10 into local DB2
   "GET_DB".REQ        := TRUE;
   "GET_DB".ID         := 1;
   "GET_DB".DONE       := "status".done;
   "GET_DB".ERROR      := "status".error;
   "GET_DB".STATUS     := "status".status;
   "GET_DB".RD_1       := P#DB2.DBX 0.0 BYTE 10;
   "GET_DB".ADDR_1     := P#DB10.DBX 0.0 BYTE 10;
   "GET_DB".LEN        := 10;              // Max 160 bytes per area, max 16 areas
The S7-300 receiving the PUT must have its DB10 marked as "Not optimized" (i.e., standard DB with absolute addressing enabled) so that PUT can target P#DB10.DBX 0.0 BYTE 10. In TIA Portal, open DB10 > Properties > Attributes and uncheck "Optimized block access".

On the S7-300/400 side, the partner station automatically accepts incoming S7 connections from PUT/GET clients when the connection object is configured and downloaded. The "Permit PUT/GET access from remote partner" option must be enabled on the S7-1200 (CPU Properties > Communication > PUT/GET Communication = "Permit"). This is the default on FW V4.0+ but verify it explicitly.

Configuring Open User Communication (TCP)

For TCP or ISO-on-TCP, TIA Portal does not create connection objects in the same way as S7 connections. You build the connection descriptor (TCON block IDB) yourself or rely on the TCON wizard.

  1. In the S7-1200 program, place "TCON" from "Instructions > Communication > Open User Communication".
  2. Right-click TCON > "Properties > Configuration" or use the inspector to fill in: connection type (TCP = 16#0B, ISOonTCP = 16#0C), partner IP, partner port (102 for S7, 2000..65535 for free), local port (0 = automatic).
  3. Use TSEND to transmit data and TRCV to receive. Both can be triggered cyclically or on event.

TCP transmit example on S7-1200 (ST):

// One-shot connection establishment
IF "first_scan" THEN
   "tccon_db".REQ := TRUE;
END_IF;

"tccon_db".CONNECT := "conn_desc"; // Filled via inspector

// Transmit when ready flag rises
IF "send_trig" AND NOT "tccon_db".BUSY THEN
   "tsend_db".REQ := TRUE;
   "tsend_db".DATA := P#DB20.DBX 0.0 BYTE 50; // up to 8192 bytes
   "tsend_db".LEN  := 50;
END_IF;

IF "tsend_db".DONE OR "tsend_db".ERROR THEN
   "tsend_db".REQ := FALSE;
   "send_trig"   := FALSE;
END_IF;

On the S7-300 side, the matching FB63 (TCON), FB64 (TSEND), FB65 (TRCV) are found in "Standard Library > Communication Blocks". Use the same connection type code: B#16#0B for TCP, B#16#0C for ISO-on-TCP. The S7-300 IDB has a different layout than the S7-1200 IDB - refer to the Siemens help on each FB block for the UDT or DATA structure layout.

For data block access compatibility, the official Siemens documentation notes that drivers handling both optimized (S7-1200/1500) and classic (S7-300/400) structures are required - the structure of the data payload must be agreed upon byte-for-byte between partners. See What is PROFIBUS/PROFINET? | Siemens I/O Protocols Explained for an overview of how protocol stacks differ across generations.

Optimized vs Classic Data Blocks

This is the most common cause of cross-generation failures. The S7-1200/S7-1500 default DB attribute is "Optimized block access" (symbolic only). The S7-300/S7-400 default is "Standard" (absolute addresses available, fixed memory layout).

Attribute Effect Impact on cross-generation comms
Optimized block access ON (S7-1200/1500) Compiler reorders variables. Symbolic access only. No fixed offsets. PUT/GET targeting P#DBx.DBX... fails unless optimized access is OFF.
Optimized block access OFF Fixed byte offsets. Absolute addresses exposed. Required for PUT/GET, BSEND/BRCV, and any peer that targets offsets directly.
Setpoints (S7-1200 retentivity) Individual variable retentive settings Independent of optimized access. Persist across power cycle.

To disable optimized access on a specific DB: open the DB in TIA Portal > Properties > Attributes > uncheck "Optimized block access". Recompile. The DB now exposes absolute addresses and can be referenced as P#DBx.DBX y.0 BYTE n by the legacy partner.

Downloading and Verification

  1. Right-click the S7-1200 > "Download to device > Hardware and software". TIA Portal will compile and push the project to the CPU. Confirm STOP-to-RUN transition.
  2. Repeat for the S7-300 station.
  3. On the S7-1200, enable "Online & Diagnostics > Diagnostics > Connection diagnostics" to see active S7 connections.
  4. On the S7-300, use "Online & Diagnostics > Diagnostics buffer" and look for connection establishment events ("S7 connection established / aborted").
  5. Monitor the PUT/GET block instance DB online. DONE should toggle TRUE on success; STATUS = 0000 means no error. Typical STATUS values: 16#8183 = partner not reachable, 16#8184 = wrong ID/ADDR, 16#8188 = DB does not exist on partner.
  6. Force a small test tag on the partner side and verify it appears on the local side within one cycle (typically 100-500 ms depending on OB1 scan time and call frequency).

Connection Resources and Limits

Station Max S7 connections Max Open User connections Notes
S7-1200 CPU 12xx Up to 16 (FW V4.x) Up to 8 active + 8 passive (varies by CPU) Connection count is consumed per partner, not per PUT/GET pair.
S7-300 CPU 315-2 PN/DP Up to 16 (S7 communication resources total) Up to 16 via FB63-68 PG/HMI/OPC UA share the same pool.
S7-300 with CP 343-1 Adds up to 16 S7 conns on the CP Adds up to 16 OUC conns CPU and CP have separate pools. Total = sum.
S7-400 CPU 41x PN Up to 32 Up to 32 Verify FW because older FW limits are lower.
S7-400 with CP 443-1 Up to 64 on the CP Up to 64 on the CP CP 443-1 Advanced higher still.

If connection establishment fails with STATUS 16#8183 ("No connection resource available"), either the local or partner CPU has exhausted its connection pool. Free resources by terminating unused PG/HMI sessions or by adding a CP.

Troubleshooting Matrix

Symptom Likely cause Verification Fix
PUT/GET STATUS = 16#8183 Partner unreachable or wrong IP Ping partner IP from PG with "ping -t" Verify IP, subnet mask, disable firewall, verify PROFINET device name resolution
PUT/GET STATUS = 16#8184 Bad ID or ADDR pointer Inspect IDB.ID and ADDR_1 pointer Set ID to match the configured connection ID; verify DB number exists on partner
PUT/GET STATUS = 16#8188 DB does not exist on partner Open partner DB in partner station, download Download the partner DB; verify DB number and length
PUT/GET STATUS = 16#8301 Partner PUT/GET access denied Check CPU properties on S7-1200 Enable "Permit PUT/GET access from remote partner" (TIA Portal V14+ default is "Deny")
Connection establishes but data never arrives Optimized DB on partner or wrong byte order Inspect partner DB attributes Disable optimized block access on partner DB; align byte order (no automatic swap)
TCON STATUS = 16#80C3 Passive partner not listening on that port Check partner TCON setup Verify partner is in "passive" mode and listening on the same port
TCON STATUS = 16#80C4 IP address unreachable Ping partner Check cabling, switch, IP/subnet
Intermittent drops during runtime Keep-alive not configured, partner CPU stops Check CPU STOP on partner Set BSEND keep-alive or call TCON in the same OB as TSEND; ensure partner CPU in RUN
Diagnostics buffer: "Connection aborted by partner" Partner CPU went STOP, watchdog timed out Check partner diagnostics buffer Restart partner, check FB/OB error OBs

Edge Cases and Field Tips

Mixing optimized and non-optimized DBs. If you cannot change a partner DB (e.g., a third-party legacy S7-300 program), use the S7-1500's "Standard access" mode for any DB that will be read by PUT/GET. For mixed deployments, mark only the boundary DBs as non-optimized; leave internal logic DBs optimized.

Firmware V2.x S7-1200. Old S7-1200 CPUs (FW V2.x) lack the PUT/GET blocks in the standard instruction library. They must be sourced from the legacy "SIMATIC S7-1200 Communication Library" example project or migrated to FW V4.x. Plan a CPU swap if firmware update is blocked by hardware revision.

CPU 315-2 PN/DP early FW. FW V2.x on 6ES7 315-2EH13-0AB0 has limited connection resources and may refuse connections if the PG port is busy. Upgrade to FW V3.3+ where applicable.

Routing through multiple subnets. If the S7-1200 is on subnet A and the S7-300 is on subnet B with a router between them, configure the default router on each CPU and add an "S7 routing" entry in TIA Portal. PG/PC must also have IP routing enabled. Use "Online > Accessible nodes" over the routing path to verify.

PROFINET IO coexistence. The same physical port can carry PROFINET IO (e.g., ET 200SP stations) and S7 connections simultaneously. The "Update time" and "Watchdog" settings for IO do not affect S7 connection timing.

OPC UA integration. If the S7-1200 also serves OPC UA clients (S7-1200 FW V4.4+ with a license), OPC UA uses its own connection resources. The S7 connection count is independent. Verify that OPC UA server is enabled (CPU Properties > OPC UA Server).

Security and Access Control

On the S7-1200 (FW V4.0+), TIA Portal introduces an access protection model with hashed passwords per CPU. The "Permit PUT/GET access from remote partner" setting is a separate toggle and is independent of the project password. Best practice for an industrial network: keep this toggle ON only on PLCs that explicitly need PUT/GET from external partners. For new development, prefer Open User Communication (TCP/ISO) with explicit TCON/TDISCON because it allows controlled lifecycle (the connection is only open when needed).

Disable unneeded services on the S7-300/400 partner: turn off Web server if not used, restrict DCP discovery with the PROFINET security settings in TIA Portal, and physically segment the plant network from the corporate network.

Performance Expectations

Method Typical update time (10-byte payload) Throughput Jitter
PUT/GET S7 connection (OB1, 100 ms cycle) 100-300 ms ~160 bytes per call ± one OB1 cycle
ISO-on-TCP, polled every 50 ms 50-150 ms ~8 KB per call ± 50 ms
TCP, polled every 10 ms 10-30 ms ~8 KB per call ± 10 ms
PROFINET IO update time (I/O, not user data) 1-32 ms configurable Per-cycle IO image Bounded by watchdog

For deterministic sub-10 ms behavior, use PROFINET IO with an ET 200 station rather than user-data blocks. For 100 ms-class control loops with hundreds of bytes, PUT/GET is fully adequate.

FAQ

Do I need a CP 343-1 for PROFINET communication with an S7-300?

No if the S7-300 CPU is a PN/DP variant (e.g., CPU 315-2 PN/DP, CPU 317-2 PN/DP, CPU 319-3 PN/DP). Yes if the CPU is a non-PN variant (CPU 312, 314, 315-2 DP) - in that case install a CP 343-1 (e.g., 6GK7343-1EX30-0XE0) in slot 4 to add the PROFINET interface.

Why does PUT/GET fail with STATUS 16#8301 even though the connection is established?

On the S7-1200, "Permit PUT/GET access from remote partner" must be enabled. Open the CPU properties > Communication > PUT/GET Communication and select "Permit". On the S7-300, the target DB must exist and be downloadable, and standard (non-optimized) access is required.

Can I read more than 160 bytes in a single PUT/GET call?

A single ADDR_1/SD_1/RD_1 pointer is limited to 160 bytes per PUT/GET, but PUT/GET supports up to 4 areas per call. For larger payloads, chain multiple calls or switch to ISO-on-TCP (TSEND/TRCV) which handles up to 8 KB per call.

Do I have to assign a PROFINET device name if I am only doing S7 communication?

No. PROFINET IO requires a device name, but pure S7 / TCP / ISO-on-TCP communication works with IP addressing only. Assigning the name is still recommended for diagnostics and consistency.

Will the same S7 connection object work after an S7-1200 firmware update?

Yes - the connection object is project-defined, not firmware-defined. After a firmware update, re-download the hardware configuration and verify the connection ID and IDB are unchanged. The partner S7-300/400 will re-establish automatically once both CPUs are in RUN.

Back to blog