Renumbering Function Blocks and Functions Used in SIMATIC PCS 7 CFCs
Renumbering Function Blocks (FB) and Functions (FC) actively utilized across Continuous Function Charts (CFC) in SIMATIC PCS 7 is executed using the SIMATIC Manager Rewire utility followed by a block type catalog update, rather than manual deletion and replacement inside individual charts. Manual deletion or direct modification of block numbers inside existing CFCs breaks instance links, erases configured engineering parameters, deletes message attributes, and corrupts chart interconnections.
Table of Contents
- Block Renumbering Constraints and Impact on CFCs
- Procedure for Rewiring and Updating Block Types
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Block Renumbering Constraints and Impact on CFCs
In SIMATIC PCS 7 and STEP 7 engineering, each block type placed inside a CFC chart references an entry in the offline block folder and the project Symbol Table. When multiple project branches or third-party libraries are merged into a master Multiproject, number collisions frequently occur (e.g., two distinct vendor libraries both utilizing FB 5 or FC 100).
Attempting to change block numbers by deleting the block in the offline folder and re-inserting it under a new number destroys all instance data blocks (DBs) and parameterization in the CFC charts:
* Instance Data Blocks: Each CFC block instance is assigned an automatically managed instance DB. The CFC compiler maps these DBs to the underlying FB number.
* Symbol Table Interdependence: The block type catalog relies on the Symbol Table mapping between symbolic name (e.g., CTRL_PID) and absolute address (e.g., FB 5).
* Rewire Engine: The STEP 7 Rewire function safely updates cross-references across code blocks (FBs, FCs, OBs) and the CFC database, substituting the old block number with the new one without wiping parameter values or signal interconnections.
Procedure for Rewiring and Updating Block Types
Follow this procedure to renumber an FB or FC (e.g., changing FB 5 to FB 6) across an entire PCS 7 project containing hundreds of CFC instances.
Prerequisites
- Full backup / project archive (
*.zip) created via SIMATIC Manager (File -> Archive). - All CFC and SFC editors closed across all engineering stations.
- Target block number confirmed to be unused in the offline block folder and within the CPU address range (check via
Options -> Reference Data -> Display -> Free Addresses).
Step 1: Update the Symbol Table
- In SIMATIC Manager, navigate to the S7 Program folder containing the block.
- Open the Symbols table.
- Locate the symbolic name associated with the block being renumbered (e.g.,
VALVE_CTRLmapped toFB 5). - Update the absolute address to the new number (e.g., change
FB 5toFB 6). - Save and close the Symbol Table.
Step 2: Execute the Rewire Utility
- In the offline Blocks folder, select the menu Options -> Rewire....
- In the Rewire dialog table:
- Under Old Value, enter the current block identifier (e.g.,FB 5).
- Under New Value, enter the target block identifier (e.g.,FB 6). - Click OK to execute.
- SIMATIC Manager scans all user code, charts, and instances, re-pointing calls from
FB 5toFB 6. - When complete, review the generated rewire log file to verify that zero syntax errors occurred.
Step 3: Rename the Block in the Offline Block Folder
- If the physical block file in the offline block folder still retains the old name, rename
FB 5toFB 6(ensure the symbolic name aligns with the updated Symbol Table). - If
FB 6already exists as an imported file with the new code, delete the obsoleteFB 5.
Step 4: Update Block Types in CFC
- Open any arbitrary CFC chart in the project.
- Select Options -> Block Types....
- In the Block Types dialog:
- In the Block library or file path section, select the offline block folder or master library.
- Select the renumbered block (e.g.,FB 6 / VALVE_CTRL).
- Click the arrow button->to transfer it to the Chart folder.
- If prompted that the block type already exists or needs updating, select New Version or Clean up. - Confirm the update. The CFC editor updates all chart instances, synchronizing internal interface signatures and block numbers.
Verification
- In SIMATIC Manager, select Options -> Reference Data -> Display -> Program Structure. Confirm that all calls point to
FB 6andFB 5no longer appears. - Open CFC, select Options -> Block Types, and confirm that the block list reports the correct block number and version status without consistency errors.
- Run a full CFC compilation (
Chart -> Compile -> Changes OnlyorEntire Program) and confirm that compilation completes with 0 errors. - Verify whether the compiler allows a
Changes Onlydownload to the CPU. Note that renumbering fundamental FBs frequently requires a CPU Stop download if instance memory mappings shift significantly.
Limitations and Operational Precautions
- Renumbering a function block alters memory layout references; in most cases, the subsequent download to the automation station (AS) requires a CPU STOP.
- After renumbering an FB that contains operator control and monitoring (OCM) tags (such as alarms or setpoints), a complete OS Compilation is mandatory to update WinCC tag prefixes and raw data block pointers.
- Never renumber standard Siemens Advanced Process Library (APL) blocks (such as
FB 1823orFC 360), as this violates library standards and breaks future PCS 7 system updates.
Engineer FAQ
- Can I renumber a block directly by editing the CFC block properties?
No. In the CFC editor, the block type number (FB/FC) is a read-only attribute derived from the offline block folder and Symbol Table. - Why does CFC report 'Type conflict' after renumbering?
A type conflict occurs if the interface (inputs, outputs, or internal parameters) of the new block number does not match the old block signature, or if the block type catalog in CFC was not refreshed viaOptions -> Block Types -> Clean up / New Version. - Will renumbering an FB delete my configured alarm messages?
No. If the renumbering is performed using the Rewire utility andOptions -> Block Types, all configured message attributes, alarm priorities, and interconnects are preserved in the CFC database. - Can I renumber FCs used in CFC using the same method?
Yes. Functions (FCs) can be renumbered using the exact same procedure: update the Symbol Table, executeOptions -> Rewire, and perform a CFC compilation. - What happens if I forget to update the Symbol Table before rewiring?
If the Symbol Table is not updated, the Rewire utility may generate an inconsistency between the absolute address and symbolic name, causing the compiler to flag missing symbol definitions.
Technical References
- Siemens Industry Online Support Entry ID 24449830: How do you renumber FBs and FCs in STEP 7 / PCS 7?
- Siemens SIMATIC PCS 7 CFC Manual: A5E41356136 - CFC for S7 / PCS 7 Engineering System.
- Siemens Technical Guidelines: Multiproject Engineering and Library Management in PCS 7.
Related Articles
- [[Resolving CFC Block Type Inconsistencies and Signature Clashes in PCS 7]]
- [[Best Practices for Merging S7 Programs into a PCS 7 Multiproject]]
- [[Troubleshooting OS Compile Errors Following CFC Block Updates]]
Related Tags
- PCS 7
- CFC
- Step 7
- Simatic Manager
- Function Block
- PLC Programming
- Industrial Automation
- Engineering System