Networking Expert Guide

Industrial Communication
Seamless Connectivity

Connect your PLCs to the world. From high-speed S7 communication to universal Modbus TCP, master the protocols that power the modern smart factory.

Understanding PLC Networking

Communication is the backbone of Integrated Automation. TIA Portal offers a wide range of instructions to exchange data between Siemens PLCs, third-party devices, and IT systems via the integrated PROFINET/Ethernet interface.

Whether you need the simplicity of PUT/GET or the flexibility of Open User Communication (OUC), choosing the right protocol is critical for system performance, security, and scalability.

Open User Communication

Native TCP/UDP and ISO-on-TCP

TSEND_C / TRCV_C — Compact Comms

TSEND_C / TRCV_C

What it does

Compact instructions that combine connection management and data transfer in a single block. They support TCP, UDP, and ISO-on-TCP protocols.

When to use it

The standard choice for modern Ethernet communication between S7-1200/1500 CPUs or when talking to PC applications via sockets.

Pro Tips

Use the 'TCON_IP_v4' system data type to define connection parameters like IP address and Port in the block interface.

Set 'CONT = TRUE' to keep the connection open permanently, reducing overhead for frequent data exchanges.

Monitor the 'STATUS' output for hex code 16#7004, which indicates that the connection is established and idle.

TCON / TDISCON — Manual Control

TCON / TDISCON

What it does

Dedicated instructions for establishing and terminating communication connections independently of the data transfer blocks.

When to use it

Used in complex architectures where you need to manage multiple connections or dynamically change target IP addresses at runtime.

Pro Tips

Always call TDISCON before changing connection parameters to ensure the socket is properly released by the OS.

Use TCON with 'active established' on one PLC and 'passive' on the partner to define the client/server relationship.

Check the local Port availability; standard user ports should be in the range 2000 to 5000.

S7 Communication

Proprietary Siemens Data Exchange

PUT / GET — Simple Remote Access

PUT / GET

What it does

Allows one PLC to read (GET) or write (PUT) data directly to the memory of a partner PLC without any code required on the partner side.

When to use it

Quick data exchange with legacy S7-300/400 systems or when you cannot modify the software of the partner PLC.

Pro Tips

You MUST enable 'Permit access with PUT/GET communication' in the CPU Protection & Security settings for it to work.

Partner DBs must NOT be 'Optimized'; standard block access is required for absolute addressing (P#DB1.DBX0.0 BYTE 10).

Limit usage for safety-critical data as the partner PLC has no control over when its data is being modified.

BSEND / BRCV — Large Block Transfer

BSEND / BRCV

What it does

Segmented data transfer protocol for sending large amounts of data (up to 64KB) over S7 connections with guaranteed delivery.

When to use it

Transferring recipe files, long strings, or diagnostic buffers between Siemens CPUs where data integrity is paramount.

Pro Tips

Both CPUs must call their respective blocks (BSEND on sender, BRCV on receiver) with matching R_ID parameters.

Use the 'DONE' and 'NDR' bits to synchronize your logic with the end of the transfer.

Check the 'LEN' parameter on the receiver side to verify the exact number of bytes received.

Modbus TCP

Universal Industrial Standard

MB_CLIENT / MB_SERVER — TCP Protocol

Modbus TCP

What it does

Implementation of the Modbus TCP protocol over Ethernet. MB_CLIENT initiates requests, while MB_SERVER responds to them.

When to use it

Communicating with third-party devices like VFDs, power meters, or SCADA systems from different manufacturers.

Pro Tips

The Modbus address mapping starts at 40001 for holding registers; in TIA Portal, use the 'MB_HOLD_REG' pointer.

Use different 'ID' parameters if you are running multiple Modbus clients to distinct servers simultaneously.

Set the Disconnect bit if the partner device frequently goes offline to avoid filling the PLC communication buffer.

MB_COMM_LOAD — Serial Config

MB_COMM_LOAD

What it does

Configures the communication module (RS485/RS232) for Modbus RTU operation, defining baud rate, parity, and flow control.

When to use it

Required as the first step before calling MB_MASTER or MB_SLAVE when using serial communication modules.

Pro Tips

Call this instruction only once during the PLC startup (using the FirstScan bit) or when parameters need to change.

Ensure the 'PORT' parameter matches the hardware identifier of the CM/CB module from the System Constants.

Verify that your wiring (Termination resistors) matches the RS485 physical layer requirements.

OUC vs PUT/GET

Selecting the most robust communication method

FeatureOpen User (TSEND_C)S7 Comm (PUT/GET)
Partner ConfigRequires code on both sidesNo code required on partner
Data SecurityHigh (Managed exchange)Low (Direct memory access)
Optimized DBsSupportedNot supported (Standard only)
CompatibilityUniversal (PC, PLC, IoT)Siemens Proprietary only
PerformanceHigh (Low overhead)Medium (Protocol overhead)
Setup EaseModerate (ID & Config)Very Easy (Simple pointer)

Frequently Asked Questions

Why does TSEND_C return error 80C4 (Temporary lack of resources)?

This usually happens when you trigger requests too fast or have too many active connections. Ensure you are checking the 'BUSY' bit before initiating a new transfer and that your connection pool is sized correctly in the CPU properties.

What is the maximum data size I can send with Modbus TCP?

A single Modbus request is limited to 125 registers (250 bytes) for holding registers. If you need to send more data, you must sequence multiple MB_CLIENT calls with different offsets.

Does S7 communication work across different subnets?

Yes, but you must ensure that 'S7 Routing' is configured in the network view and that gateways/routers are correctly defined in the CPU hardware configuration.

What is 'Keep-Alive' and should I use it?

Keep-Alive sends small packets during idle periods to prevent intermediate routers from closing an inactive connection. It is highly recommended for long-lived OUC connections between different buildings or segments.

Master Distributed Automation

Building a large-scale network or integrating legacy equipment? T-IA Connect simplifies PLC-to-PLC and PLC-to-Cloud data synchronization.