Porting S7 Open User Communication (TSEND/TRCV) Programs to CPU 410-5H and Process Object Impact

Porting S7 Open User Communication (TSEND/TRCV) Programs to CPU 410-5H and Process Object Impact

In SIMATIC PCS 7, porting legacy S7-300/S7-400 applications utilizing Open User Communication (OUC - TSEND, TRCV, TUSEND, TURCV) written in STL or SCL to a CPU 410-5H controller is fully supported and consumes ZERO Process Objects (0 POs). Process Objects on the CPU 410-5H System Expansion Card (SEC) are consumed exclusively by blocks with Operator Control and Monitoring (OCM) attributes (S7_m_c = true) and technological library blocks. To deploy custom communication code: place custom FBs, FCs, and DBs within unreserved ranges (FBs above FB2500, DBs 1 to 60, FCs 60 to 700), call them from a cyclic OB (OB35 or OB1) via CFC or block folders, and compile hardware configurations in PCS 7.

Table of Contents

Executive Summary

Plant modernization projects frequently require integrating proven third-party or legacy S7-300/S7-400 communication programs—such as extensive TCP/IP or UDP socket interfaces using TSEND, TRCV, TUSEND, and TURCV—onto modern SIMATIC PCS 7 CPU 410-5H controllers. Because the CPU 410-5H utilizes a Process Object (PO) licensing architecture governed by a physical System Expansion Card (SEC), engineers often fear that thousands of communication data blocks and function calls will exhaust costly PO licenses. Furthermore, concerns arise regarding whether CFC chart downloads will accidentally overwrite working DBs. This article outlines the architectural rules, block numbering conventions, and zero-PO licensing status for custom communication blocks on CPU 410-5H.

Architecture and Fundamental Mechanics

The SIMATIC PCS 7 CPU 410-5H Process Automation controller is built upon the S7-400 hardware platform, retaining complete binary compatibility with standard STEP 7 execution instructions (STL, SCL, LAD, FBD).

  1. Process Object (AS RT PO) Accounting Rules:
    - In the CPU 410-5H operating system, Process Objects are tracked dynamically against the System Expansion Card (SEC) limit.
    - A block counts as a Process Object ONLY if it meets two criteria: it is a technological block (e.g., motor, valve, closed-loop controller, or analog monitor) AND it possesses the attribute S7_m_c = 'true' (enabling WinCC message and tag compilation).
    - Pure communication function blocks (TSEND, TRCV, TCON, TDISCON, TUSEND, TURCV), standard data blocks, and custom user mathematical/communication routines contain no OCM attributes and therefore consume EXACTLY 0 POs.

  2. Memory and Range Management in PCS 7:
    - The CFC compiler reserves specific block number ranges for automatically generated chart code and instance data blocks:

    • Function Blocks (FBs): CFC reserves FB1 to FB2499. Custom user communication FBs must be assigned block numbers above FB2500 (e.g., FB2501..FB9999).
    • Data Blocks (DBs): CFC allocates instance DBs dynamically from DB61 upward. Custom static global DBs (such as communication buffers) should be numbered DB1 to DB60 (or within a customized reserve range configured in CFC compile settings).
    • Functions (FCs): Custom FCs should use FC60 to FC700.
  3. Preventing Data Block Overwrites During CFC Downloads:
    - CFC incremental downloads only re-initialize data blocks managed directly by CFC charts. Hand-coded communication DBs residing independently in the S7 Program blocks folder are downloaded individually via SIMATIC Manager and are NEVER overwritten or re-initialized by CFC downloads.

Step-by-Step Implementation Procedure

  1. Verify CPU 410-5H Hardware and SEC Capacity:
    a. Open STEP 7 HW Config, insert the CPU 410-5H controller, and configure the internal PROFINET interfaces (PN-X5) for Open User Communication.
    b. Ensure a System Expansion Card (e.g., SEC 500 PO or matching plant requirement) is inserted in the CPU configuration.
    c. In CPU Properties -> Cycle/Clock Memory, ensure sufficient communication load is allocated (typically 20% minimum).

  2. Renumber Legacy Communication Blocks:
    a. Open the source project containing the legacy STL/SCL communication program.
    b. Inspect the block folder: renumber any custom FBs currently numbered below FB2500 to numbers within the range FB2500..FB9999.
    c. Renumber static communication data blocks (send/receive buffers) to numbers within the range DB1..DB60.
    d. Recompile the SCL sources to link the newly assigned block numbers.

  3. Import Blocks into the PCS 7 Multiproject:
    a. Copy the renumbered FBs, FCs, and DBs into the target S7 Program Blocks folder of the CPU 410-5H.
    b. If Open User Communication connections are configured dynamically via data blocks (e.g., TCON_PAR), verify the connection parameters (remote IP, local/remote port, connection ID).

  4. Establish Calling Structure (CFC or S7 Organization Blocks):
    a. Option A (CFC Integration - Recommended): Drag the custom master communication FB directly into a dedicated CFC chart (e.g., @Comm_Charts) running in cyclic OB35. This allows visual monitoring.
    b. Option B (Direct Block Call): Insert a call to your master communication FB directly within OB1 or OB35 in the S7 block folder.

  5. Compile and Download to CPU 410-5H:
    a. Execute Chart -> Compile -> Chart as Program... in CFC.
    b. In SIMATIC Manager, select the CPU and execute PLC -> Download.
    c. Confirm that working DBs are downloaded without re-initialization warnings.

Verification

  1. Open SIMATIC Manager and select PLC -> Module Information -> Performance Data / Process Objects: verify that the total PO count has NOT increased as a result of adding the communication blocks.
  2. Open the communication DBs online: verify that TSEND and TRCV execute cyclically and increment telegram transmission counters.
  3. Test field communication: transmit data packets to the remote partner and verify that DONE and NDR (New Data Received) strobe successfully without ERROR flags.
  4. Execute an AS download of changes from CFC: confirm that communication DBs maintain their online working values without data loss.

Limitations and Operational Precautions

While custom STL and SCL blocks execute without PO consumption, they lack automated APL diagnostics, maintenance station asset management, and high-availability redundant switchover mechanisms natively provided by PCS 7 channel drivers. In redundant H-systems (CPU 410-5H dual rack), ensure Open User Communication connections utilize fault-tolerant S7 connections or redundant connection blocks to avoid communication drops during CPU failover. SEC sizing and licensing should be confirmed with an authorized Siemens distributor or the Siemens Industry Mall.

Engineer FAQ

Do TSEND and TRCV blocks consume PCS 7 Process Objects?

No. Standard communication blocks do not have OCM (Operator Control and Monitoring) attributes and consume zero Process Objects on the CPU 410-5H.

Why must custom FBs be numbered above FB2500 in PCS 7?

Because the PCS 7 CFC compiler reserves block numbers FB1 to FB2499 for technological blocks, channel drivers, and automatically generated system blocks.

Will downloading a CFC change re-initialize my custom communication DBs?

No. CFC delta downloads only update blocks managed by CFC; standalone DBs in the S7 blocks folder are outside CFC's re-initialization scope.

Can the CPU 410-5H execute Open User Communication via its internal PN-X5 ports?

Yes. The onboard PROFINET interfaces (PN-X5) natively support TCP, UDP, and ISO-on-TCP protocols using standard T-blocks (TCON, TDISCON, TSEND, TRCV).

Can I switch the project property 'Use' from PCS 7 to STEP 7?

Yes, modifying the 'Use' property in project properties permits standard STEP 7 download dialogs, but is generally unnecessary if block ranges are respected within PCS 7.

Technical References

Related Articles

Related Tags

  • CPU 410-5H
  • TSEND
  • TRCV
  • Open User Communication
  • Process Objects
  • Block Numbers
20 respuestas