Expanding Function Block (FC) Number Ranges and Memory Compacting in SIMATIC PCS 7 S7-400 CPUs
To increase the available FC block range in a CPU 416-3 (or other S7-400 / CPU 410 controller), open any CFC chart and navigate to 'Options > Customize > Compile/Download'. Under the 'Range of numbers for resources reserved for CFC', adjust the 'From' and 'To' fields for FCs (for example, raising the upper limit from 1140 toward 2047). After expanding the range, execute a CFC compilation. Note that reallocating block ranges or running 'Compress' in the Blocks folder permanently alters block number assignments, invalidating Delta Download and requiring an entire AS download with the CPU in STOP.
Table of Contents
- S7-400 Architecture and CFC Block Number Allocation
- Configuring Resource Ranges in CFC Customization Settings
- The Role of Block Memory Compaction and Its Impact on Delta Download
- Hardware Limits Comparison: CPU 416 vs CPU 417 vs CPU 410
- S7-400 Block Number Range and Capacity Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
S7-400 Architecture and CFC Block Number Allocation
In SIMATIC PCS 7, the Continuous Function Chart compiler automatically generates internal Function Blocks (FBs), Functions (FCs), and Data Blocks (DBs) to execute chart logic, manage runtime groups, coordinate SFCs, and handle module drivers. To prevent collisions with user-written STEP 7 blocks or library blocks, CFC partitions block number ranges into reserved pools.
In a standard S7-400 CPU 416-3, the maximum physical FC capacity is 2,048 blocks (numbered FC 0 to FC 2047). However, the default CFC project template often restricts the CFC compiler range to a smaller band (such as FC 1 to FC 1140), leaving the remaining 907 numbers reserved. When large automation programs expand, the compiler exhausts this range and triggers compile errors: FC limit exceeded.
Configuring Resource Ranges in CFC Customization Settings
To expand the FC resource pool in CFC:
- Open CFC Editor: In SIMATIC Manager, open any CFC chart.
- Open Customization Dialog: Select Options > Customize > Compile/Download.
- Locate Resource Ranges: Inspect the group labeled Resources reserved for CFC.
- Adjust FC Upper Boundary: In the FC row, expand the 'To' limit (e.g., change
1140to1800or2040). Reserve a small buffer at the very top (e.g., FC 2040 to 2047) for standard system functions or communication coprocessors. - Adjust DB Upper Boundary: If instance DBs are also nearing exhaustion, similarly expand the DB range toward the CPU limit.
- Save Settings: Click OK to apply the updated boundaries to the AS program database.
The Role of Block Memory Compaction and Its Impact on Delta Download
After altering resource boundaries or deleting obsolete charts, the internal block list may become fragmented with isolated gaps between block numbers. Engineers often execute File > Blocks > Compress in SIMATIC Manager to eliminate gaps and defragment memory.
However, expanding block ranges and compressing memory has severe operational consequences:
-
Delta Download Invalidation: Shifting resource boundaries forces the compiler to renumber internal FCs and DBs. This destroys the incremental tracking chain, permanently disabling 'Download Changes in RUN'.
-
Mandatory CPU STOP: The next download must be an Entire Program Download, which transitions the S7-400 into STOP mode, halting all active physical processes.
-
Mandatory Readback Before Compress: You must execute a complete CFC Readback before recompiling and compressing; otherwise, renumbering will overwrite online tuned parameters with defaults upon downloading.
Hardware Limits Comparison: CPU 416 vs CPU 417 vs CPU 410
The maximum block range is fundamentally constrained by the CPU hardware model (MLFB) and firmware release:
-
CPU 416-3 (6ES7416-3ER05-0AB0): Maximum of 2,048 FCs and 2,048 FBs (range
0to2047). Maximum work memory typically 5.6 MB to 16 MB. -
CPU 417-4 (6ES7417-4XT05-0AB0 / 6ES7417-4XT07-0AB0): Maximum of 8,192 FCs and 8,192 FBs (range
0to8191), with up to 30 MB work memory. -
CPU 410-5H Process Automation (6ES7410-5HX08-0AB0): Flagship controller supporting up to 8,192 FCs and 8,192 FBs, with dynamic memory allocation scaled via System Expansion Cards (SEC).
S7-400 Block Number Range and Capacity Matrix
The following table compares block capacities across major S7-400 and CPU 410 controllers:
6ES7414-3EM07-0AB0FC 0..2047)FB 0..2047)6ES7416-3ES07-0AB0FC 0..2047)FB 0..2047)6ES7417-4XT07-0AB0FC 0..8191)FB 0..8191)6ES7410-5HX08-0AB0FC 0..8191)FB 0..8191)Verification
Verify resource range expansion through the following steps:
- Open CFC, navigate to Options > Customize > Compile/Download, and confirm the new FC range (e.g.,
1 to 1800) is displayed. - Compile the CFC program (Entire program). Confirm that compilation finishes with '0 Errors' and no 'FC limit exceeded' warnings.
- In SIMATIC Manager, select the Blocks folder and click Options > Reference Data > Display > Block Numbers. Confirm that the compiled FC numbers occupy the expanded range cleanly without collisions.
- During an authorized plant outage, execute the complete program download to the CPU in STOP, transition to RUN, and verify that all control loops resume normal execution.
Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.
Limitations and Operational Precautions
Consider these operational rules when managing block ranges:
-
Never Exceed the Physical Hardware Limit: Setting the FC range in CFC above the physical CPU limit (e.g., typing 3000 on a CPU 416 that only supports 2047) will cause compilation to fail or the CPU to reject the download.
-
Reserve Ranges for Standard Functions: Always reserve a block of numbers (e.g., FC 1 to FC 60) for standard STEP 7 system libraries (such as IEC timers, string functions, and communication coprocessor drivers).
-
Planned Outage Requirement: Never adjust block ranges while the plant is in active production, because recovery requires a CPU STOP download.
Engineer FAQ
What does the 'Compress' function do in the SIMATIC Manager Blocks folder?
The Compress function defragments the block storage area in the offline database and CPU load memory, packing blocks together to eliminate gaps left by deleted blocks.
Why should I execute CFC Readback before compressing blocks?
Compressing and renumbering blocks destroys the offline-to-online address relationship. Readback must be executed first so live setpoints are captured before renumbering.
What happens if a user-written FC shares a number with a CFC-reserved FC?
The CFC compiler detects a number collision and halts compilation with a fatal error. CFC numbers must be segregated from user-written blocks.
Technical References
- SIMATIC S7-400 Programmable Controller: CPU Specifications Manual (Entry ID: 109780813)
- SIMATIC Process Control System PCS 7 CFC for S7 / S7-400 Manual
- SIMATIC PCS 7 Engineering System Compendium Part A - Configuration Guidelines
- Siemens Technical Support: Managing Block Numbers and Resources Reserved for CFC
Related Articles
- CFC Parameter Readback: Safety and Consistency Rules When Uncompiled
- Increasing the Limit of Installed Runtime Groups in PCS 7
- Deleting Blocks in SIMATIC PCS 7 Blocks Folder: Compilation Regeneration Rules
Related Tags
- FC Block Range
- CPU 416-3
- CFC Compilation
- Memory Compress
- Entire Download
- S7-400