Migrating Legacy Ethernet Communication Blocks FB205 (FR_AGSEN) and FB206 (FR_AGRCV) to AG_SEND and AG_RECV in PCS 7
In legacy SIMATIC PCS 7 systems migrating from V5.x to modern releases (such as PCS 7 V6.1, V7.x, or V8.x), function blocks FB205 (FR_AGSEN) and FB206 (FR_AGRCV) were specialized wrapper blocks belonging to the obsolete PCS 7 V5 Communication Library. They were designed to provide a simplified CFC interface for Ethernet communications via CP 443-1 by internally invoking the standard communication functions AG_SEND (FC5) and AG_RECV (FC6). When updating software, Siemens discontinued these wrapper blocks. To resolve missing block errors, engineers must replace FR_AGSEN and FR_AGRCV with the official standard communication functions FC5 (AG_SEND) and FC6 (AG_RECV) located in the SIMATIC_NET_CP library under the CP400 folder.
Table of Contents
- Historical Background: FR_AGSEN and FR_AGRCV in PCS 7 V5.x
- Why the Wrapper Blocks Were Discontinued in Modern PCS 7
- Locating FC5 (AG_SEND) and FC6 (AG_RECV) in the SIMATIC_NET_CP Library
- Step-by-Step Procedure to Replace Legacy Ethernet Blocks in CFC
- Comparison of Legacy Wrapper Blocks vs Modern Standard FCs
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Historical Background: FR_AGSEN and FR_AGRCV in PCS 7 V5.x
In early PCS 7 releases (V4.x and V5.x), executing raw ISO-on-TCP or TCP/IP communications over Industrial Ethernet communication processors (CP 443-1) required calling Step 7 communication functions. To make these blocks easier to use inside the Continuous Function Chart (CFC) editor without manual edge-trigger management, Siemens introduced the 'PCS 7 Communication Library'.
This library introduced two core Function Blocks:
1. FB205 (FR_AGSEN): Cyclic send wrapper for Ethernet telegrams.
2. FB206 (FR_AGRCV): Cyclic receive wrapper for incoming Ethernet telegrams.
Under the hood, these FBs simply passed parameters directly to the underlying SIMATIC NET functions FC5 AG_SEND and FC6 AG_RECV.
Why the Wrapper Blocks Were Discontinued in Modern PCS 7
Starting in PCS 7 V6.0, Siemens fundamentally changed its industrial communication strategy:
- Driver Standardization: The driver generator and APL library established standardized S7 fault-tolerant connections (BSEND/BRCV) for inter-AS communication.
- Deprecation of Obsolete Wrappers: The separate PCS 7 Communication Library was retired. Retaining
FR_AGSENandFR_AGRCVcaused naming and numbering collisions with new system driver blocks (such asFB205 OB_BEGIN_HPNandFB206 MOD_CENTRALin modern Basis Libraries). - Direct FC Utilization: Modern Step 7 compilers allow FC5 and FC6 to be placed directly into CFC charts, eliminating the need for wrapper FBs.
Locating FC5 (AG_SEND) and FC6 (AG_RECV) in the SIMATIC_NET_CP Library
When replacing these blocks on an updated Engineering Station, engineers must select the correct library container:
- In SIMATIC Manager, select File > Open > Libraries.
- Open the SIMATIC_NET_CP library.
- Navigate to folder CP 400 > Blocks (CRITICAL: Do NOT select the
CP 300folder, as S7-300 communication functions use different pointer structures). - Copy FC5 (
AG_SEND) and FC6 (AG_RECV) into your project's Master Library and offlineBlocksfolder.
Step-by-Step Procedure to Replace Legacy Ethernet Blocks in CFC
To execute the block migration cleanly:
- Record Existing Parameters: Open the CFC chart containing FB205 (
FR_AGSEN) and FB206 (FR_AGRCV). Record the Connection ID (ID), Logical Address (LADDR), Send DB pointer (DATA), and Send Length (LEN). - Delete Legacy Blocks: Delete the FB205 and FB206 blocks from the CFC chart.
- Purge Block Types: In CFC, select Options > Block Types...; clean up FB205 and FB206 from the chart folder.
- Insert FC5 and FC6: Drag FC5 (
AG_SEND) and FC6 (AG_RECV) from the library into the CFC chart. - Parameterize Inputs:
- ConnectACT: Assign a cyclic clock pulse or condition to trigger transmission.
- ConnectIDandLADDR: Match the NetPro connection parameters.
- ConnectSEND/RECV: Enter the ANY pointer to the data buffer (e.g.,P#DB100.DBX0.0 BYTE 128). - Compile and Download: Compile CFC with scope 'Entire program' and download to the controller.
Comparison of Legacy Wrapper Blocks vs Modern Standard FCs
The following table compares legacy V5 wrapper blocks with modern SIMATIC NET communication functions:
| Feature Dimension | Legacy Wrapper: FB205 / FB206 | Modern Standard: FC5 / FC6 (CP400) |
|---|---|---|---|
| Library Origin | Obsolete PCS 7 Communication Library | Official SIMATIC_NET_CP Library |
| Memory Footprint | Consumes 1 FB instance DB + internal FC call | Lightweight Function call (No instance DB) |
| Collision with Modern Basis Lib | Clashes with OB_BEGIN_HPN / MOD_CENTRAL | Zero block number collisions |
| Data Transmission Trigger | Internal autonomous cyclic pulse | User-controlled deterministic ACT trigger |
| Long-Term DCS Support | Discontinued since PCS 7 V6.0 | Fully maintained across all PCS 7 releases |
Verification
Verify Ethernet communications after block replacement:
1. Inspect the CP 443-1 front LEDs: confirm that the RUN LED is green and SF (System Fault) is extinguished.
2. In the CFC chart, monitor FC5 online: verify that DONE pulses true upon each transmission and ERROR remains false (0).
3. Monitor FC6 online: verify that incoming data records populate the receive data block and NDR (New Data Received) pulses true.
4. Verify in the CPU diagnostic buffer that no communication execution errors (such as event 0x4540) are logged.
Limitations and Operational Precautions
Always verify whether the communication partner requires fixed or variable length telegrams; when using AG_RECV on TCP native connections, configure LEN = 0 to read variable packet sizes without buffer truncation. Never copy FC5/FC6 from the CP 300 library into an S7-400 program, as the S7-300 communication processor routines will cause CPU STOP events when executed on an S7-400 processor.
Engineer FAQ
Why did my modern PCS 7 library contain different blocks under FB205 and FB206?
In modern PCS 7 Basis Libraries (V8/V9), Siemens reused block numbers FB205 for OB_BEGIN_HPN (H-CPU function block) and FB206 for MOD_CENTRAL. The original FR_AGSEN was discontinued decades ago.
Where can I find FC5 and FC6 in Step 7?
They reside in the official SIMATIC_NET_CP library inside the CP400 folder.
Can I use S7 connections instead of AG_SEND and AG_RECV?
Yes! If the communication partner is another S7 controller or WinCC station, using configured S7 Connections with standard SFB 12 (BSEND) and SFB 13 (BRCV) is the preferred, higher-performance Siemens standard.
Technical References
- SIMATIC NET Program Blocks for SIMATIC NET S7-CPs Programming Manual
- SIMATIC Process Control System PCS 7 Software Update Guide
- SIMATIC S7-400 Industrial Communication with CP 443-1 Manual
Related Articles
- Identifying Replacements for Obsolete FB205 and FB206 During PCS 7 V5.2 to V6.1 Migration
- Diagnosing S7 Connection Rejection and Connection Resource Exhaustion on S7-400 CPUs in PCS 7
- Monitoring Redundant S7-400H Controller Connections in SIMATIC PCS 7 Using System Diagnostics vs CONEC and SFC 87
Related Tags
- AG_SEND
- AG_RECV
- CP 443-1
- Ethernet Communication
- Migration