1. Overview of Open User Communication on S7-1500
Open User Communication (OUC) is the program-controlled communication mechanism used on SIMATIC S7-1200, S7-1500, and S7-1500T CPUs to exchange data over the integrated PROFINET/Industrial Ethernet interface or over a CP 1543-1. OUC supports ISO-on-TCP (RFC 1006), TCP, UDP, and Modbus TCP transports, all configured through the TIA Portal Instructions task card under Communication > Open User Communication. Unlike S7 Communication (PUT/GET/BSEND/BRCV) which is connection-table driven and pre-declared, OUC uses the TCON, TDISCON, TSEND, TRCV, TUSEND, and TURCV instruction blocks; the connection is established at runtime from the user program rather than from a static project configuration alone.
On an S7-1500 station with a CPU 1511-1 PN and a CP 1543-1, OUC connections can be terminated on either the integrated PN interface of the CPU or on the CP. This matters because the connection-resource budgets of the CPU and the CP are independent: spending connections on the CP does not reduce the CPU's own PN budget, and vice versa. The connection view in TIA Portal ("Connection resources" / Verbindungsressourcen) reflects this distinction.
Authoritative reference material:
- Basic Examples for Open User Communication (OUC)
- Examples of Open User Communication: TCP (PDF, V1)
- Basics of Open User Communication (S7-1200 / S7-1500 / S7-1500T)
2. Connection Resource Architecture: CPU + CP 1543-1
Each SIMATIC S7-1500 CPU and each CP maintains its own connection-resource table. The total number of OUC, S7, HMI, routing, Web server, OPC UA, and PG/OP connections that can be simultaneously established is the sum of the resources allocated to the active interface that terminates the connection. Mixing protocols is permitted as long as the total does not exceed the maximum number of connection resources for the given interface.
For a CPU 1511-1 PN, the integrated PROFINET interface provides a fixed pool of connection resources. The exact maximum is published in the device manual:
- SIMATIC S7-1500 CPU 1511-1 PN Manual (entry ID 68020492) — see section "Performance / Number of connections".
The CP 1543-1 ships with its own connection-resource pool that is configured in the CP's device properties. The CP 1543-1 supports up to 118 connection resources in the standard configuration (some firmware versions vary; consult the CP manual for the exact figure for the firmware loaded in the project).
Architecture summary for the 10-OUC scenario:
| Interface | Connection Resources Available | Typical Use |
|---|---|---|
| CPU 1511-1 PN (X1) | 96 (per manual 68020492, page 5) | PG/OP, HMI, S7, OUC terminated on CPU |
| CP 1543-1 (X1/X2) | Up to 118 (CP-specific) | OUC terminated on CP, security/VPN, additional HMI |
3. TCON, TSEND, TRCV Block Set
OUC is implemented as a coordinated set of FBs (Function Blocks) from the TIA Portal instruction library. The following FBs are the minimum required for one active client connection in TCP or ISO-on-TCP mode:
| Block | FB Number (S7-1500) | Purpose |
|---|---|---|
| TCON | FB 1001 (extended) / FB 1900 (legacy) | Establishes the connection at runtime using the connection description DB |
| TDISCON | FB 1002 / FB 1901 | Terminates the connection cleanly, releasing the resource |
| TSEND | FB 1004 / FB 1902 | Sends data on an established connection |
| TRCV | FB 1005 / FB 1903 | Receives data on an established connection |
| TUSEND | FB 1904 | UDP send (connectionless) |
| TURCV | FB 1905 | UDP receive (connectionless) |
| T_RESET | FB 1906 | Resets the connection in error state |
Each TCON call requires an instance DB (the "connection description DB") that holds the connection parameters: interface ID, connection type, remote IP/port, local port, and active/passive role. TIA Portal auto-generates this DB if you drag TCON into a network and let the inspector generate the connection. If you call TCON as a free block in the program, you must declare the connection DB manually and set CONNECT to point to it.
Example TCON call (SCL style):
// One OUC client connection terminated on CP 1543-1
"TCON_DB".ID := 16#0001; // Connection ID, unique per project
"TCON_DB".ConnectionType := 16#0B; // 0x0B = TCP/IP (16#0C = ISO-on-TCP, 16#0D = UDP)
"TCON_DB".ActiveEstablished := TRUE; // Active = client
"TCON_DB".LocalPort := 0; // 0 = any free local port
"TCON_DB".RemoteAddress := '10.10.20.55';
"TCON_DB".RemotePort := 2000;
"TCON_DB".InterfaceId := 64; // HW identifier of CP 1543-1 interface
TCON_1(REQ := bStart, CONNECT := "TCON_DB", DONE => bDone, BUSY => bBusy, ERROR => bErr, STATUS => wStatus);
The InterfaceId is the HW identifier from the CP's PROFINET port (visible in Devices & Networks > CP 1543-1 > Properties > System constants). Using the CPU's integrated port requires the CPU's own HW identifier, usually 64 or 65 in default projects.
4. Connection ID, Multiple-Connection Discipline
Each TCON connection must be assigned a unique ID (16-bit) within the CPU. For 10 simultaneous OUC connections, declare IDs 1 through 10 (or any non-overlapping set). Duplicate IDs cause TCON to return STATUS = 16#8085 ("Connection ID is already in use") on the second call.
| Connection | ID | Remote IP | Remote Port | Direction |
|---|---|---|---|---|
| Partner 1 | 1 | 10.10.20.11 | 2000 | Active |
| Partner 2 | 2 | 10.10.20.12 | 2000 | Active |
| Partner 3 | 3 | 10.10.20.13 | 2000 | Active |
| ... | ... | ... | ... | ... |
| Partner 10 | 10 | 10.10.20.20 | 2000 | Active |
Each connection needs its own TCON instance DB, its own TSEND instance DB, and its own TRCV instance DB. Shareable multi-instance DBs (multi-instances) are not supported for TCON/TSEND/TRCV because each DB holds connection state. Plan for 30 instance DBs for 10 fully bidirectional connections.
5. TIA Portal Connection Resources View
The "Connection resources" / Verbindungsressourcen table that the user expected to see is opened as follows:
- Open the project in TIA Portal.
- Select the CPU 1511-1 PN in the project tree.
- Right-click and choose Properties > Connection resources — or from the menu: Online > Online & diagnostics > Connection resources.
- For a CP, navigate to the CP 1543-1 in the project tree and repeat the same steps.
Two separate views exist:
- Offline view — shows resources reserved by the configured connections in the project (declared in the connection table or via TCON connection DBs). This number is the maximum that could be used when the program runs.
- Online view — shows resources currently consumed by the running CPU/CP. This is the figure that matters at runtime, because a TCON that is never called does not consume a resource until it is executed.
6. Going Online to See Connection Consumption
To see real connection consumption on a running CPU 1511-1 PN:
- Connect the PG to the same subnet as the CPU (or to the CP 1543-1 if the connection terminates there).
- Right-click the CPU (or CP) in the project tree and select Go online.
- Open Online & diagnostics > Diagnostics > Connection resources.
- The table now shows, per interface, the number of established connections out of the maximum.
Expected reading for a CPU 1511-1 PN with 10 active OUC connections terminated on the CP 1543-1:
| Module | Interface | Connections Used | Max |
|---|---|---|---|
| CPU 1511-1 PN | X1 (PN/IE) | 2 (PG + HMI, for example) | 96 |
| CP 1543-1 | X1 (PN/IE) | 10 (the OUC connections) | 118 |
If the OUC connections are configured to terminate on the CPU's X1 port, the CPU will show 12 used (10 OUC + PG/HMI), and the CP will show only its own connections (e.g., 0 used for OUC plus whatever HMI/S7 traffic it terminates).
7. Connection Termination: CPU vs. CP — Decision Matrix
| Criterion | Terminate on CPU 1511-1 PN (X1) | Terminate on CP 1543-1 (X1/X2) |
|---|---|---|
| Security / firewall / VPN | No | Yes (CP 1543-1 is the security module) |
| Routing into other subnets | Limited (CPU only routes on X1) | Yes (CP can route to X2) |
| Connection resource cost | Consumes from 96 budget | Consumes from CP's ~118 budget |
| Suitable for plant-bus / inter-controller traffic | Yes | Yes |
| Suitable for cross-network / DMZ / third-party | Not recommended | Recommended |
For 10 connections to a fleet of third-party controllers in a separate subnet, terminating on the CP 1543-1 is the standard Siemens-recommended architecture.
8. TIA Portal Version and Firmware Compatibility
Open User Communication has been available since the first S7-1500 firmware releases. The TIA Portal version determines the instruction-set you can use and the diagnostic detail available. The original poster used TIA Portal V13 SP2; for production work today, V16, V17, V18, V19, or V20 is recommended.
Firmware version of the CPU and CP must be compatible with the TIA Portal version used to compile the project. If TIA V13 SP2 is retained for compatibility, the supported CPU firmware is constrained — consult the TIA Portal release notes for the exact matrix.
Known OUC-related bugs (firmware-specific, do not assume your firmware is affected):
- Older S7-1500 CPU firmware (pre-V2.0) had issues with TCON under heavy load. Fix was provided in firmware updates.
- CP 1543-1 firmware V2.x had a VPN keep-alive issue that affected OUC through VPN. Fixed in V2.1.x.
Always check the firmware release notes for both the CPU and CP before deploying a 10-connection OUC design.
9. Common STATUS / ERROR Codes for TCON, TSEND, TRCV
| STATUS (hex) | Block | Meaning | Remedy |
|---|---|---|---|
| 16#0000 | All | No error | — |
| 16#7000 | TSEND/TRCV | No job active | Normal idle state |
| 16#7001 | TSEND/TRCV | Job starting | Wait for completion |
| 16#7002 | TSEND/TRCV | Job running | Wait for completion |
| 16#8085 | TCON | Connection ID already in use | Use unique IDs per connection |
| 16#8086 | TCON | Local port already in use | Set LocalPort := 0 to auto-assign |
| 16#80A1 | TCON/TSEND/TRCV | Connection or interface error | Check InterfaceId and physical link |
| 16#80A3 | TCON | Connection being established attempt aborted | Retry, check partner reachability |
| 16#80A7 | TCON | Connection error, partner not responding | Verify partner IP, port, firewall |
| 16#80B5 | TSEND/TRCV | Connection terminated by partner / TDISCON | Re-establish with TCON |
| 16#80C3 | TSEND/TRCV | Remote partner has terminated the connection | Wait for next TCON or trigger re-establish |
| 16#80C4 | TSEND/TRCV | Temporary communications error, retry possible | Retry automatically; check ERROR bit |
10. Establishing and Cycling Connections at Runtime
A robust pattern for 10 OUC connections wraps each one in a state machine: Idle → Connect → Established → Send/Receive → Disconnect → Idle. Use a single TCON per connection; call it cyclically with REQ until DONE rises, then drive TSEND/TRCV. On ERROR from any block, call TDISCON to release the resource, then re-call TCON after a debounce (typically 1–2 s).
// State machine for connection 1 (excerpt)
CASE iState1 OF
0: // Idle
IF bStart THEN
TCON_1(REQ := TRUE, CONNECT := "TCON_DB_1");
iState1 := 1;
END_IF;
1: // Connecting
TCON_1(REQ := FALSE);
IF TCON_1.DONE THEN iState1 := 2; END_IF;
IF TCON_1.ERROR THEN iState1 := 90; END_IF;
2: // Established
TSEND_1(REQ := bSendTrig, DATA := sendBuf, LEN := 100);
TRCV_1(EN_R := TRUE, DATA := rcvBuf, LEN := 100);
IF TRCV_1.NDR OR TSEND_1.ERROR OR TRCV_1.ERROR THEN iState1 := 90; END_IF;
90: // Disconnect
TDISCON_1(REQ := TRUE);
iState1 := 91;
91: // Wait
TDISCON_1(REQ := FALSE);
IF tWait.Q THEN iState1 := 0; END_IF;
END_CASE;
11. Verification Procedure After Commissioning
- Go online with the CPU 1511-1 PN. Confirm CPU diagnostics show no connection errors.
- Open the connection resources online view on the terminating module (CPU or CP 1543-1). Confirm the expected number of "used" connections matches the runtime count.
- From the project tree, use Online & diagnostics > Diagnostics > Statistics to view per-connection byte counts and error counts.
- From a partner device (PC with
netstat -an, Wireshark, or another SIMATIC CPU), verify the TCP sessions are inESTABLISHEDstate and the byte counters are advancing. - Force a partner-side disconnect; confirm the corresponding TCON automatically re-establishes after the configured retry logic.
- Cycle power on the CPU; confirm all 10 connections re-establish without operator intervention within the expected time (typically < 30 s for a CP 1543-1).
12. Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| Connection resources view shows 0 used in offline mode | OUC connections are runtime-only via TCON | Go online to see real consumption |
| STATUS 16#8085 on TCON | Duplicate connection ID | Assign unique IDs (1–10) per connection |
| STATUS 16#8086 on TCON | LocalPort in use by another TCON | Set LocalPort := 0 to let system assign |
| STATUS 16#80A7 on TCON | Partner unreachable / wrong IP / firewall | Verify IP, subnet, port, and firewall on partner |
| STATUS 16#80A1 on TSEND | Connection not yet established | Sequence: TCON → wait DONE → TSEND |
| TSEND busy, never completes | Partner not reading socket, receive window full | Verify partner is calling TRCV / read on socket |
| Connections drop randomly under load | Keep-alive timeout, CP buffer exhaustion, or partner timeout | Reduce send rate, increase keep-alive on CP |
| CPU shows more used connections than expected | HMI, PG, OPC UA, S7 connections sharing the pool | Audit all configured connections in project tree |
| CP 1543-1 connections slow after security rules applied | Firewall inspection overhead | Profile rules, consider separating OUC from VPN subnet |
FAQ
How many OUC connections can a CPU 1511-1 PN handle simultaneously?
The CPU 1511-1 PN has 96 connection resources on its integrated PROFINET interface, per the device manual (entry 68020492). The CP 1543-1 has its own independent pool of up to 118 connection resources, so terminating 10 OUC connections on the CP leaves the CPU's 96-resource budget entirely free for HMI, PG, and S7 traffic.
Why does the Connection Resources view show no used connections offline?
OUC connections declared solely with the TCON instruction in the program are not established until the CPU runs the TCON block. Switch from the offline to the online diagnostics (right-click the CPU or CP → Go online → Online & diagnostics > Connection resources) to see the live count.
Do all 10 OUC connections have to terminate on the same module?
No. Connections can terminate on the CPU's X1 port or the CP 1543-1's X1/X2 port independently. Mixing is permitted as long as each module's resource maximum is respected, and each connection's InterfaceId in the TCON connection DB points to the correct HW identifier.
What TIA Portal version is required to use modern TCON / TSEND / TRCV blocks on an S7-1500?
Open User Communication has been available since the first S7-1500 firmware and TIA Portal V12. For new projects, TIA Portal V16 or later is strongly recommended. TIA V13 SP2 (the version originally referenced) works but does not support the latest instruction extensions and lacks the modern connection diagnostics surface.
What is the most common reason TCON fails with STATUS 16#8085?
Duplicate Connection ID within the same CPU. Each of the 10 OUC connections must have a unique 16-bit ID; assigning 1 through 10 in the connection DBs eliminates this error.