Overview
Connecting a SIMATIC S7-1200 to a SIMATIC S7-300 over Ethernet is one of the most common migration and retrofit tasks in the Siemens S7 world. The S7-1200 has an integrated PROFINET interface, so it can be connected directly. The S7-300, however, has no onboard Ethernet port on the classic CPU family (CPU 312, CPU 315, CPU 317, CPU 319); Ethernet is provided by a SIMATIC NET CP 343-1 communication processor in slot 4 (or slot 0–6 of the rack, depending on configuration).
This guide addresses the recurring engineering question: can I use TSEND_C on the S7-1200 with AG_RECV/AG_SEND on the S7-300 CP, or do I have to use PUT/GET? The short answer is that both paths are supported in TIA Portal, but they belong to different communication protocols and have different block libraries, connection-resource limits, and LADDR semantics.
The two practical solutions are:
-
Open User Communication (TCP/ISO-on-TCP) via CP:
TSEND_C/TRCV_Con the S7-1200 withAG_SEND/AG_RECV(or the newerTCON/TSEND/TRECV) on the S7-300, with the LADDR parameter pointing to the CP module start address. -
S7 Communication (PUT/GET) via the S7 connection:
PUT/GETon both controllers. The CP routes the S7 connection in the background; the application blocks run on the CPU and need no LADDR.
Communication Path Selection
Before writing any code, choose the protocol. The selection is driven by data size, cycle time, and existing program structure.
| Criterion | TSEND_C / AG_SEND (TCP / ISO-on-TCP) | PUT / GET (S7 Communication) |
|---|---|---|
| Protocol class | Open User Communication (RFC 1006 / TCP) | S7 Communication (Siemens proprietary) |
| S7-1200 blocks | TSEND_C, TRCV_C, TCON, TDISCON | PUT, GET |
| S7-300 blocks (CPU side) | n/a (blocks run on CP) | PUT (FB14), GET (FB15) on CPU |
| S7-300 blocks (CP side) | AG_SEND (FC5), AG_RECV (FC6) in SIMATIC_NET_CP | n/a (CP supports the S7 connection transparently) |
| LADDR required | Yes – I/O start address of the CP | No – block uses the S7 connection ID |
| Max user data per call | Up to 8192 bytes (TSEND_C / AG_SEND payload limit) | PUT: 400 bytes; GET: 462 bytes (per call) |
| Connection configuration | Established at runtime by the block (TSEND_C, TCON) | Configured in NetPro / "Devices & Networks" once; reused |
| Direction | Bidirectional, either side may initiate | Bidirectional; either side may call PUT/GET |
| Best for | Larger payloads, raw TCP, non-S7 partners | Small data exchange with S7-300/400/1200/1500 |
For typical S7-to-S7 data exchange under 400 bytes per job, PUT/GET is the recommended path because the CP routing is transparent and the configuration overhead is minimal. For larger payloads, repeated streaming, or when the S7-300 is the gateway to a non-S7 partner, use TSEND_C with AG_SEND/AG_RECV.
Prerequisites
-
Hardware
- S7-1200 CPU with integrated PROFINET interface (any 12xx CPU: 1211C, 1212C, 1214C, 1215C, 1217C) on PROFINET X1.
- S7-300 station with one of:
6GK7 343-1CX00-0XE0(CP 343-1 Lean),6GK7 343-1EX10-0XE0(CP 343-1), or6GK7 343-1GX20-0XE0(CP 343-1 Advanced). The CP must be inserted in slot 4 of the S7-300 rack (slot 0–6 are valid; slot 4 is conventional). - Ethernet switch or direct patch cable between the S7-1200 PROFINET port and the CP 343-1 RJ45 port.
-
Software
- TIA Portal V13 SP1 (minimum). For newer CP 343-1 firmware revisions, install the matching HSP under Options > Support Packages.
- Project with both stations configured: S7-1200 (controller) and S7-300 (controller) with the CP 343-1 inserted in the device configuration.
-
Network
- IP addresses in the same subnet, e.g. S7-1200 = 192.168.0.10 / 24, S7-300 CP = 192.168.0.20 / 24.
- No firewall on engineering PG that blocks TCP ports 102 (S7) or 2000/2001 (ISO-on-TCP/TSEND_C default).
CP 343-1 Variants and Connection Resources
Connection resources are the limiting factor on the S7-300 side. The number of parallel S7 / open user communication connections depends on the CP variant.
| CP variant | Order number (example) | Max S7 connections | Max SEND/RECV connections | Role in S7 comm |
|---|---|---|---|---|
| CP 343-1 Lean | 6GK7 343-1CX00-0XE0 | 4 | 4 | Server only for S7 communication |
| CP 343-1 (Standard) | 6GK7 343-1EX10-0XE0 | 8 | 8 | Client / Server |
| CP 343-1 Advanced | 6GK7 343-1GX20-0XE0 | 16 (extensible) | 16 | Client / Server, with IT functions |
PUT), the S7-1200 must be the Server and the S7-300 the Client; the Lean CP cannot establish an active S7 connection as a client. For TSEND_C with AG_SEND/AG_RECV, the Lean CP is likewise limited – the S7-300 cannot initiate the TCP connection from the Lean CP. Plan your client/server direction accordingly when the S7-300 uses a Lean CP.
For project planning, total S7 connections on the S7-300 station equal the sum of connections used by the CP 343-1 plus any connections that terminate on the CPU. Most S7-300 CPUs reserve a small number of S7 connection resources internally (typically 0 for classic S7-300 CPUs – connections to the CPU are routed through the CP). Check the CPU's "Communication" tab in the device properties for the precise number reserved for OP/PG/other S7 CPU connections.
S7-1200 Connection Resources
The S7-1200 has a fixed pool of connection resources. The exact split depends on CPU model and firmware. In TIA Portal, open the S7-1200 device configuration and select the CPU; the connection resources are listed in the inspector window under Properties > Communication. The Siemens TIA Portal documentation describes the display of S7-1200 connection resources.
| Resource type | CPU 1211C / 1212C | CPU 1214C / 1215C | CPU 1217C |
|---|---|---|---|
| PG connections (reserved) | 1 | 1 | 1 |
| OP/HMI connections (reserved) | 3 | 3 | 3 |
| S7 connections (configurable) | 8 | 12 | 16 |
| Open user communication (TCP/UDP) connections | 8 | 8 | 8 |
TSEND_C / PUT will return error code 0x80C3 ("No resources available") and TRCV_C / GET will report 0x80C3 as well. Reduce reserved OP connections in the CPU properties to free resources for S7 communication.
Block Library Requirements
On the S7-1200 side, the relevant blocks live in the standard Program blocks > Communications palette of TIA Portal: PUT, GET, TSEND_C, TRCV_C, TCON, TDISCON.
On the S7-300 side the picture is split:
-
S7 communication (PUT/GET): blocks
FB14 "PUT"andFB15 "GET"are in the standard library under Standard Library > Communication Blocks (or in TIA Portal under Communication > S7 Communication). They run on the CPU and do not require the CP block library. -
Open user communication via CP: blocks
FC5 "AG_SEND",FC6 "AG_RECV",FC10 "AG_LOCK",FC11 "AG_UNLOCK"are in the SIMATIC_NET_CP library. If the library is not visible in TIA Portal, the S7-300 station may not contain a configured CP, or the CP HSP is missing.
Siemens publishes the related engineering guidance in the Industry Online Support FAQ entry ID 18610307, which describes S7 communication between S7-1200 and S7-300/400 and lists compatible blocks and CP variants.
Configuring TSEND_C on the S7-1200
TSEND_C is an integrated instruction that handles connection establishment, sending, and disconnection. It is part of the open user communication set and works on the S7-1200 PROFINET interface without any CP. The connection target is referenced by a connection description in the project (Devices & Networks > Connections), which is generated when you call the instruction for the first time and click the wizard link.
Typical input parameter values for an S7-1200 → S7-300 (CP 343-1) call:
| Parameter | Type | Value | Comment |
|---|---|---|---|
REQ |
BOOL | Rising edge from job trigger | Starts a send job |
CONT |
BOOL | TRUE (keep connection) | Set FALSE only when the job is one-shot |
LEN |
UINT | User data length, e.g. 100 | Bytes to send |
DATA |
VARIANT | Pointer to send DB, e.g. P#DB10.DBX0.0 BYTE 100
|
Payload area |
CONNECT |
TCON_IP_V4 | Generated by wizard | Contains remote IP, remote port, local TSAP |
DONE |
BOOL | Output | Job completed without error |
BUSY |
BOOL | Output | TRUE while job is active |
ERROR |
BOOL | Output | 1 = error; check STATUS
|
STATUS |
WORD | Output | Hex error code (see diagnostics table) |
When the wizard creates the TCON_IP_V4 data block, set the partner (S7-300 CP) IP address, the partner port (default 2000 for ISO-on-TCP), and the connection ID. The connection ID is local to the S7-1200 station and must be unique across all open user communication connections on this CPU.
Configuring AG_SEND / AG_RECV on the S7-300
On the S7-300 side, when the S7-1200 initiates a TSEND_C transfer over TCP/ISO-on-TCP, the CP 343-1 receives the data through its ISO-on-TCP protocol engine and makes the payload available to the user program via AG_RECV. The CP expects an active "receive job" to be permanently scheduled.
To send data back to the S7-1200, the S7-300 program calls AG_SEND with a destination that matches the established connection. The CP's connection database is created by the partner's TSEND_C/TCON call at runtime, so the S7-300 must use the same connection ID as the S7-1200 in the case of TSEND_C, or an ID assigned in NetPro / "Devices & Networks" if a static ISO-on-TCP connection was configured.
| Parameter | AG_SEND (FC5) | AG_RECV (FC6) |
|---|---|---|
ACT / ID
|
ACT: 1 = trigger send job | ID: connection reference (1..16) |
ID |
Connection reference (1..16) | Same as AG_SEND |
SEND / RECV
|
SEND: any / pointer to send area (P#DBxx.DBXy.z BYTE n) | RECV: pointer to receive area |
LEN |
Length in bytes | Length of receive area in bytes (max 8192) |
DONE |
Output – job complete | Output – new data received |
ERROR / STATUS
|
Output – error indicator + status word | Output – error indicator + status word |
LADDR |
CP module start address (decimal WORD) | CP module start address (decimal WORD) |
Determining the LADDR Parameter
The LADDR input is the most common source of confusion. It is not the IP address and not the slot number; it is the logical I/O base address assigned to the CP in the S7-300 station's hardware configuration.
- Open the S7-300 station in the project tree and double-click Device configuration.
- Click on the CP 343-1 module in the rack graphic.
- In the inspector window, expand Properties > General > I/O addresses.
- Read the Input start address and Output start address. The values are in bytes, decimal. Default for slot 4 is often 256 (decimal, 0x100 hex) or 272 (decimal, 0x110 hex) depending on the CP version and TIA Portal project settings.
- Enter that decimal value in the
LADDRinput ofAG_SENDandAG_RECVas a WORD.
// Example call – S7-300 STL
CALL FC6 // AG_RECV
ID := W#16#1 // connection ID 1 (matches S7-1200 TSEND_C CONNECT.ID)
LADDR := W#16#100 // CP start address 256 decimal
RECV := P#DB20.DBX0.0 BYTE 100
NDR := M10.0
ERROR := M10.1
STATUS := MW12
LEN := MW14
If LADDR is wrong, the CP returns status 0xE002 (CP not reachable / wrong address) or 0xE080 (no diagnosis entry). Always verify against the value shown in the HW config, not against the slot number.
Connection ID and TSAP Management
Each communication relationship uses two connection IDs – one local to each partner – and one or more TSAP identifiers. Confusing the two is a frequent cause of error 0x8082 ("Connection already in use") or 0x8083 ("No connection available").
-
S7 communication (PUT/GET): one S7 connection is configured in Devices & Networks > Connections. The local connection ID is assigned automatically; it is visible in the connection's properties.
PUT/GETreference this ID via theIDinput. The S7-1200 connection ID and the S7-300 connection ID are independent – they do not have to match. -
TSEND_C / AG_SEND/AG_RECV: the connection is dynamic. The connection ID is set in the
TCON_IP_V4data block on the S7-1200 side and must be passed toAG_SEND/AG_RECVon the S7-300 side so that the CP can associate the runtime connection with the user job.
TSAP format for ISO-on-TCP follows the pattern xx.yy where xx is the rack/slot encoded in hex and yy is a sub-slot. For an S7-300 CP 343-1 in rack 0 slot 4, a valid local TSAP is 01.04 (rack 0 + slot 4). The S7-1200 partner TSAP can be left at default 00.00 unless required by the network configuration.
PUT / GET Path (S7 Communication)
If the goal is simple register or DB exchange with a payload under 400 bytes per call, use PUT/GET on both controllers. This is the path of least resistance.
- In Devices & Networks, draw a line between the S7-1200 PROFINET interface and the CP 343-1. The connection wizard will offer S7 connection as a possible type.
- On the S7-300 side, the local ID is auto-assigned; leave the CP as the endpoint.
- On the S7-1200 side, in Program blocks, insert a
PUTinstruction. WireREQto a trigger,IDto the local S7 connection ID,ADDR_1to the S7-300 DB, andSD_1to the local DB. - Insert
GETfor the reverse direction withRD_1pointing to the local receive DB.
// S7-1200 PUT call – SCL
"PUT_DB"(REQ := bStart,
ID := 16#0001, // local S7 connection ID
DONE=>bDone, ERROR=>bErr, STATUS=>wStatus);
ADDR_1 := P#DB200.DBX0.0 BYTE 20; // S7-300 remote DB200, 20 bytes
SD_1 := P#DB100.DBX0.0 BYTE 20; // S7-1200 local DB100, 20 bytes
For the S7-300 side, drag FB14 "PUT" and FB15 "GET" from Communication Blocks into a DB, create an instance DB, and call them with the S7 connection ID shown in Devices & Networks > Connections. The S7-300 instance DB must be present in the CPU at runtime; PUT/GET on S7-300 cannot access an undefined DB.
Step-by-Step: TSEND_C + AG_SEND / AG_RECV Configuration
- Wire the network. Connect the S7-1200 PROFINET X1 and the CP 343-1 RJ45 to the same switch or with a patch cable.
- Assign IP addresses. S7-1200 = 192.168.0.10 / 24; CP 343-1 = 192.168.0.20 / 24. Disable any router setting on the S7-1200 PROFINET interface (use subnet directly).
- Configure the CP 343-1 in HW config. Open the S7-300 station, double-click the CP 343-1, and set the IP, subnet mask, and (optionally) the connection type. Note the I/O start address from I/O addresses.
-
Insert the TSEND_C block on the S7-1200. Add a new FB or use OB1. Insert
TSEND_C; click on the Connection description link to open the wizard. Pick the S7-300 CP 343-1 as the partner. Choose ISO-on-TCP, set the partner port 2000, and finish the wizard. TIA Portal generates theTCON_IP_V4data block. -
Insert AG_RECV on the S7-300. In the S7-300 program, drag
FC6 "AG_RECV"from the SIMATIC_NET_CP library. SetIDto the connection ID used in step 4,LADDRto the CP start address, andRECVto a receive DB of sufficient size. LeaveAG_RECVpermanently scheduled (call it cyclically in OB1). -
Insert AG_SEND on the S7-300 for the reverse direction. Call
FC5 "AG_SEND"with the sameIDandLADDR; pointSENDto a DB of payload data and trigger with a rising edge onACT. - Configure PUT/GET permission on the S7-300. If the S7-300 also needs to use PUT/GET, open the CPU properties > Communication and tick Permit access via PUT/GET communication partner. Without this, the CPU will reject partner requests from the S7-1200.
- Compile and download. Compile the S7-300 station first, then the S7-1200. Download both. Bring the S7-300 to RUN with the CP initialized, then run the S7-1200.
-
Monitor. Use the S7-1200's Watch table to monitor the send/receive DBs and the
TSEND_Coutputs. Use the S7-300's Monitor/Modify to inspect the AG_SEND/AG_RECV status words.
Verification and Diagnostics
Use these checks to confirm a working link.
- LEDs on the CP 343-1: the "LINK" LED should be solid green; the "RX/TX" LED should flicker when data is exchanged. No LED activity points to a physical layer issue or wrong port.
- Online & Diagnostics on the CP 343-1: in TIA Portal select the S7-300 station, right-click the CP 343-1, choose Online & Diagnostics > Diagnostics. Look for the partner IP and the established connection. The "Status of connections" tab shows the number of active connections and their state.
- Connection status on the S7-1200: open Online & Diagnostics > Connections on the S7-1200. The connection should show state Established; status word = 0.
- Watch tables: write a test pattern into the S7-1200 send DB and check whether it appears in the S7-300 receive DB within the configured send/receive cycle. Repeat for the reverse direction.
-
Trace with status codes: capture the
STATUSoutput ofTSEND_CandAG_SEND/AG_RECVin the watch table and compare against the diagnostic table below.
Troubleshooting Matrix
| Symptom | Status / Indicator | Likely cause | Action |
|---|---|---|---|
| TSEND_C stuck in BUSY, no DONE/ERROR | STATUS = 0x7002 |
CP unreachable or wrong LADDR | Verify CP IP, subnet, and LADDR start address |
| TSEND_C returns ERROR immediately | STATUS = 0x80C3 |
No local connection resources | Reduce reserved HMI/OP connections on the S7-1200 |
| TSEND_C ERROR with partner unreachable | STATUS = 0x80A1 |
Partner not listening on port 2000 | Check CP ISO-on-TCP port and TSAP |
| AG_RECV reports no reception | STATUS = 0xE080 |
LADDR does not match CP base address | Re-read CP I/O addresses from HW config |
| AG_SEND ERROR 0xE002 | STATUS = 0xE002 |
Connection not established | Check connection ID match with TSEND_C |
| PUT reports connection error | STATUS = 0x8083 |
No free connection resource on S7-300 | Check CP type; Lean = 4 max |
| Data zeros on partner side | n/a (no error) | Wrong DB pointer or DB length | Verify P#DBxx.DBX0.0 BYTE n on both sides |
| Connection established but jobs fail sporadically | STATUS = 0x8183 |
CP firmware mismatch / partner out of resources | Update CP firmware and check resource budget |
| PUT/GET works one way only | n/a | PUT/GET access not permitted on S7-300 | Tick "Permit access via PUT/GET" in CPU properties |
Field-Proven Caveats
- CP 343-1 Lean as S7-300 active partner is impossible for S7 communication. Use a Standard or Advanced CP if the S7-300 must initiate an S7 connection, or reverse the direction (S7-1200 active, S7-300 passive).
-
AG_SEND/AG_RECV must be called cyclically with a positive edge only on
ACT. Forgetting to call AG_RECV results in the CP discarding incoming data. - Connection resource numbers are total, not per block. Each configured S7 connection in Devices & Networks consumes one resource from the S7-1200 pool, even if the program never calls PUT/GET.
- The S7-1200 PROFINET interface is shared with PROFINET IO. If the CPU is also a PROFINET IO controller with many devices, the load on the interface may delay open user communication. Move to a CP 1242-7 or external switch if communication jitter becomes an issue.
- TSAP on ISO-on-TCP must be unique per CP. Two ISO-on-TCP connections from two S7-1200 stations to the same CP 343-1 with identical TSAPs will conflict.
Can I use TSEND_C on the S7-1200 with AG_RECV on the S7-300?
Yes, but only for open user communication (TCP or ISO-on-TCP), not for S7 communication. Place TSEND_C on the S7-1200 PROFINET interface and call AG_SEND/AG_RECV (FC5/FC6 from the SIMATIC_NET_CP library) on the S7-300 with the LADDR set to the CP module's I/O start address (e.g., 256 decimal) and a matching connection ID.
Do I have to use PUT/GET if the S7-300 has a CP 343-1?
Not necessarily. PUT/GET is the easiest path for S7-to-S7 data exchange under 400 bytes per call because the CP routes the S7 connection transparently and the blocks run on the CPU. For larger payloads, raw TCP/ISO-on-TCP traffic, or non-S7 partners, use TSEND_C/TRCV_C on the S7-1200 and AG_SEND/AG_RECV on the S7-300.
Where do I find the LADDR value for AG_SEND/AG_RECV?
Open the S7-300 station, double-click the CP 343-1, and read the input/output start address under Properties > I/O addresses. The default for a CP in slot 4 is often 256 (0x100 hex). Enter that decimal value in the LADDR input of FC5 and FC6 as a WORD.
Why does the CP 343-1 Lean not establish the connection as the active partner?
The Lean variant supports only 4 S7 connections and is restricted to the Server role in S7 communication. If the S7-300 must be the active partner, use a CP 343-1 Standard (8 connections) or Advanced (16 connections) – both can act as Client or Server.
How do I display the S7-1200 connection resource usage?
Open the S7-1200 CPU in the device configuration, select the CPU in the rack, and inspect the Properties > Communication tab in the inspector window. The reserved and free resources are listed per category (PG, OP/HMI, S7, open user communication). See the TIA Portal documentation on displaying S7-1200 connection resources.
What is the maximum payload per call with PUT/GET versus TSEND_C/AG_SEND?
PUT transfers up to 400 user data bytes per call, GET up to 462 bytes. TSEND_C on the S7-1200 and AG_SEND on the S7-300 each move up to 8192 bytes per call when used over ISO-on-TCP. Use BSEND/BRCV if you need block-oriented transfer with handshake semantics.