Use the PCS 7 Modbus TCP/IP Library over an S7-400 CPU PROFINET Port
The MODTCP_* blocks are provided by Siemens' separate, licensed Modbus TCP/IP PCS 7 driver library rather than being part of the standard PCS 7 block libraries. For an S7-400 CPU's integrated PROFINET interface, Siemens' 2021 manual identifies FB509 MODTCP_COM_T for a single CPU and FB510 MODTCP_COMRED_T for redundant operation; the CPU-side connection uses TCON=1. That library manual predates PCS 7 V9.1 and requires Siemens clearance for versions beyond PCS 7 V9.0 SP3, so confirm the correct library release and V9.1 compatibility before installing or using it.
Table of Contents
- Identify the protocol and communication roles
- Obtain the correct licensed library release
- Select blocks for the integrated PROFINET interface
- Configure the CPU PN communication path
- Understand what the library does not establish
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Identify the protocol and communication roles
The source refers to a Modbus TCP/IP manual and block names MODTCP_C, MODTCP_W and MODTCP_R. The opened Siemens manual uses the names MODTCP_COM, MODTCP_WRITE and MODTCP_READ (with _T variants for integrated PROFINET interface). It documents PCS 7 as a Modbus TCP client/master sending requests to a remote Modbus slave/server. If the other AS is not configured to act as a compatible Modbus server, this library's documented client role does not establish a generic symmetric AS-to-AS data link.
Do not confuse Modbus TCP/IP with arbitrary TCP socket data transfer. Confirm the other station supports Modbus TCP and the required client/server direction, data types and function codes.
Obtain the correct licensed library release
The Siemens Modbus TCP/IP manual (05/2021, Entry ID 109480633) says the driver is a separately setup STEP 7 library and requires a license. It installs by default under <installation directory>\SIEMENS\STEP7\S7libs; after installation, open it in SIMATIC Manager with File > Open > Library.
That 2021 manual lists PCS 7 releases only through V9.0 SP3 and states that use with higher versions requires clearance from [email protected]. PCS 7 V9.1 is therefore not covered by that edition of the library manual. A later Siemens search-indexed manual identifies newer library V2.5 for PCS 7 V9.1, but the current PDF could not be opened during this research; verify the exact current release, supported library version and license with Siemens before deploying it. Do not assume the older V2.4 library is cleared for V9.1.
Select blocks for the integrated PROFINET interface
The opened 2021 manual identifies these communication blocks:
FB509 MODTCP_COM_TTCON=1FB510 MODTCP_COMRED_TTCON=1FB515 MODTCP_COMFB516 MODTCP_COMREDUse the _T variants for the CPU PN path described by the manual. The manual says FB509/FB510 are for CPUs with an integrated interface (and may also be used with a CP); FB515/FB516 are for CPUs without integrated PN and using a CP. The documented hardware scope is S7-41x / S7-41xH with supported CP443-1 EX20 or an integrated PROFINET interface. Confirm exact CPU/firmware compatibility in the library edition approved for PCS 7 V9.1.
Configure the CPU PN communication path
For the internal CPU PROFINET interface, Siemens documents the following parameter and interconnection approach. Use these steps only with an approved library release and compatible hardware:
- Add the licensed Modbus TCP/IP library blocks to the project using the library's documented install/import process.
- In CFC, use the appropriate communication block (
FB509for a single CPU orFB510for a redundant system) and the correspondingMODTCP_WRITEand/orMODTCP_READrequest blocks. - Connect the communication block's
CONNECToutput to each request block'sCONNECTinput. The manual states that a maximum of ten request blocks are processed sequentially; additional connected blocks are not considered. - For CPU PN, configure
REM_IP,REM_PORT,CPU_IDandTCON_ID; setTCON=1. The manual saysLADDRandCONN_IDare irrelevant for this path. Each connection needs its ownTCON_ID(or the documented redundant pair identifiers). - Set
CPU_IDaccording to the CPU and interface mapping in the applicable manual. The 2021 edition lists16#05for CPUs 41x using the CPU 41x X5 port. Do not copy this value to another CPU/interface without confirming its library documentation. - Configure the remote Modbus partner as a server/slave with the corresponding IP/port, register or coil map, data types and supported function codes. The 2021 library manual states function codes 1–6 and 15–16 are supported.
- Place the communication block in the documented cyclic interrupt OB and include its restart OB calls as specified in the manual. Compile, validate in a test setup and download only under the project's approved procedures.
For the integrated interface with TCON=1, the manual says a NetPro TCP connection is not required; with CP communication (TCON=0), NetPro configuration is required. Do not apply the CP procedure to the CPU PN case.
Understand what the library does not establish
The Siemens manual describes the S7-400 system as a Modbus client/master and the remote device as a Modbus server/slave; requests are processed sequentially and each response is expected before the next request. The library is not a general transparent channel between two arbitrary PLC programs. Confirm that the partner AS implements the required Modbus server behavior and that both sides agree on addresses, byte/word order, scaling, data types and update expectations. The provided source does not specify those partner details.
Verification
Before commissioning, verify that the installed library version is explicitly approved for the PCS 7 V9.1 project and that its license is valid. Confirm the CPU model and integrated PN interface are supported. In the CFC project, check the communication/request block types, CONNECT wiring, TCON=1, partner IP/port, CPU_ID, unique TCON_ID values and register/function-code configuration. During controlled testing, verify both request status and the actual received/written data at the partner; a compiled project or established TCP connection alone does not prove the register map is correct.
Limitations and Operational Precautions
The exact historical library edition attached by the original user is unavailable. The opened Siemens manual is dated 05/2021 and covers PCS 7 only through V9.0 SP3; it explicitly requires Siemens clearance for higher versions. A later official Siemens search result identifies library V2.5 for PCS 7 V9.1, but that PDF could not be opened in this research session, so its details are not treated as independently verified here. Obtain and inspect the current V9.1 library documentation and license conditions before engineering. Changes to communication logic, data maps, CPU calls or interface parameters can affect control behavior; use backups, peer review, controlled tests and approved download/rollback procedures.
Engineer FAQ
Are MODTCP_C, MODTCP_W and MODTCP_R standard PCS 7 blocks? The opened Siemens documentation describes a separate licensed STEP 7 library and names its blocks MODTCP_COM, MODTCP_WRITE and MODTCP_READ (including interface variants).
Which block is used for a single S7-400 CPU with integrated PROFINET? The 2021 manual identifies FB509 MODTCP_COM_T for singular CPU PN communication.
Which block is used for redundant integrated-PN communication? It identifies FB510 MODTCP_COMRED_T.
Does the 2021 library manual establish compatibility with PCS 7 V9.1? No. It lists through V9.0 SP3 and requires Siemens clearance for higher versions. A later manual search result lists a V2.5 library for V9.1, which must be checked directly before use.
Does this library make two PCS 7 AS systems symmetric Modbus peers? No. The documented PCS 7 role is client/master and the remote Modbus node is server/slave. Confirm that the other AS implements the needed server role.
Technical References
- Siemens, Modbus TCP/IP, Entry ID 109480633, 05/2021, §§2.1–2.3 (license, software and hardware requirements), §§3.1–3.3 (library, supported functions and client/server principle), §5.1 (block selection), and CPU PN parameterization, pp. 9–10, 11, 21–23: https://cache.industry.siemens.com/dl/files/633/109480633/att_1072934/v1/109480633_MODBUS_TCPIP_en.pdf
- Siemens, Modbus/TCP Communication, Entry ID 75867147, V1.7, 12/2024, §2.8.2 and §3 (separate Modbus/TCP library and PCS 7 client arrangement; this is a different redundant CP solution): https://cache.industry.siemens.com/dl/files/147/75867147/att_1307960/v1/75867147_Modbus_TCP_Client_PCS_7_V100_DOC_V1_7_en.pdf
Related Articles
- PCS 7 Modbus TCP/IP driver library
- PCS 7 CPU PROFINET communication
- PCS 7 Modbus client and server roles