Identifying Data Blocks and Instance DBs Generated by SFC Charts in SIMATIC PCS 7 - Chart Reference Data and S7 Resource Allocation
In SIMATIC PCS 7, compiling a Sequential Function Chart (SFC) automatically generates three S7 data blocks in the controller's block container: an Instance Data Block (for the SFC runtime engine FB 300 or FB 247), a Topology Data Block, and a State/Step Transition Data Block. Because the compiler assigns raw block numbers (e.g. DB 301, DB 302, DB 303) without descriptive chart names, engineers can definitively identify which DB belongs to a specific SFC by opening Chart Reference Data in SIMATIC Manager (via right-click on SFC > Charts > Chart Reference Data, or shortcut Ctrl+K) and selecting View > S7 Resource Allocation.
Table of Contents
- Internal Architecture of SFC Compilation in S7-400 Controllers
- The Three Data Blocks Generated per SFC Chart
- Using Chart Reference Data to Map SFCs to Instance DBs
- SFC Generated Data Block Structure and Function Table
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Internal Architecture of SFC Compilation in S7-400 Controllers
In SIMATIC PCS 7, Sequential Function Charts (SFC) provide deterministic sequence control for batch processes, startup sequences, and procedural operating modes. Unlike standard STEP 7 linear code:
- SFC Engine Execution:
* The SFC chart itself does not compile into raw S7 statement list (STL) rungs inside an OB.
* Instead, PCS 7 utilizes a standardized runtime engine: FB 300 (@SFC_RTS) in classic PCS 7 or FB 247 (SFC_RTSP) in newer releases.
* During compilation, the compiler generates structured data blocks containing the sequencer state logic, step timing parameters, transition conditions, and target object pointers.
- Dynamic Block Number Allocation:
* In a project containing dozens of SFC charts, the compiler draws available DB numbers from the reserved system range (e.g. DB 300 to DB 1000).
* In the offline S7 block container, these DBs display only generic system names (DBnnn), making manual identification impossible without system cross-reference tools.
The Three Data Blocks Generated per SFC Chart
For every individual SFC chart compiled in the project, the compiler generates three distinct data blocks:
-
The Instance Data Block (Instance DB of FB 300 / FB 247):
- Contains the execution control interface of the SFC.
- Holds operating modes (Manual, Auto), command inputs (START,HOLD,ABORT,RESET), step execution timers, and the current active step number.
- This is the primary DB read or manipulated by external supervisory programs, custom faceplates, or third-party communications. -
The Topology Data Block (Structure DB):
- Contains the static structural layout of the sequence: branching topologies, simultaneous branch synchronizations, and sequence termination branches.
- Defines step numbers, transition numbers, and execution predecessor/successor relationships. -
The State and Transition Data Block (Dynamic Work DB):
- Stores pre-compiled condition expressions for transition gates and step action assignments.
- Holds runtime state flags for transition evaluation results and minimum/maximum step time countdowns.
Using Chart Reference Data to Map SFCs to Instance DBs
To identify which data block corresponds to a specific SFC chart:
-
Accessing Chart Reference Data:
- In SIMATIC Manager Plant View or Component View, right-click any CFC or SFC chart.
- Select Charts > Chart Reference Data (or pressCtrl + K).
- The SIMATIC PCS 7 Reference Data window opens. -
Selecting S7 Resource Allocation:
- In the menu bar, select View > S7 Resource Allocation (or click the resource grid icon).
- The window displays a comprehensive grid of all controller resources: Timers (T), Counters (C), Bit Memory (M), Function Blocks (FB), and Data Blocks (DB). -
Filtering and Cross-Referencing:
- Scroll down to the Data Blocks (DB) section.
- Locate the DB number in question (e.g.DB 342).
- The Chart / Symbol column displays the exact chart pathname:
text DB 342 | Instance DB | FB 300 | Plant1/Area2/SFC_Reactor_Fill
- Alternatively, open View > Block Types, expandFB 300, and inspect the list of all instantiated instance DBs alongside their associated SFC chart pathnames.
SFC Generated Data Block Structure and Function Table
The following table details the three data blocks generated for each compiled SFC chart:
FB 300 / FB 247BA_EN, STATUS, CURSTEP, QSTART, QHOLD, QSTOP@SFC_TOP)@SFC_TRN)T_MIN, T_MAX), transition flagsVerification
To confirm the correlation between an SFC chart and its generated instance DB:
1. Open the SFC chart in SIMATIC Manager and double-click to launch the SFC Editor.
2. In the SFC Editor menu, select SFC > Properties > Options. Note the configured chart name and chart comment.
3. Open Chart Reference Data (Ctrl + K) and navigate to View > S7 Resource Allocation.
4. Confirm that the SFC chart name points to the identified Instance DB number.
5. In SIMATIC Manager, open the S7 Block Folder, open that specific DB in the LAD/STL/FBD Editor, and verify that the DB symbolic header references FB 300 or FB 247 and displays the matching chart instance comment.
Limitations and Operational Precautions
When interacting with SFC-generated data blocks:
1. Never Manually Edit Generated SFC DBs: Do not modify variable declarations, addresses, or values inside the generated DBs using the standard DB editor. Any subsequent compilation of the SFC will completely overwrite the data blocks.
2. Compressing / Reassigning DB Numbers: Running a full compile with 'Generate new DB numbers' or performing a slow reorganization can reassign DB numbers. Never hardcode absolute DB addresses (e.g. DB342.DBX0.0) in external HMIs or communications; always reference symbolic tags.
3. SFC Types vs SFC Charts: Note that SFC Types instantiated as SFC instances in CFC charts have their instance DB numbers assigned directly in CFC like standard function blocks, making their mapping visible directly in the CFC chart properties.
Engineer FAQ
Can I rename the generated SFC data blocks in the S7 block container?
No. The compiler dynamically assigns symbolic names (e.g. @SFC_...) based on internal numbering. Manually renaming them in the block container will cause compilation errors during the next delta compile.
What happens to the generated DBs if I delete an SFC chart?
When you delete an SFC chart and perform a compilation with 'Clean Up Block Types / Reorganize', the compiler deletes the associated instance DB, topology DB, and transition DB, freeing those numbers for reuse.
How do I control an SFC from an external third-party SCADA system?
Use the symbolic variables in the SFC Instance DB (FB 300). Write to control inputs like START, HOLD, ABORT, and monitor status words like BA_STATE or CURSTEP via standard S7 communication or OPC.
Why does one SFC generate three DBs while another generates four?
Very large SFCs with complex branching, extensive step actions, or high transition counts exceed the maximum 64 KB segment limit of an S7-400 data block. In such cases, the compiler automatically splits the topology or transition logic across an auxiliary data block.
Technical References
- SFC for SIMATIC S7 / PCS 7 Programming and Operating Manual
- CFC for SIMATIC S7 / PCS 7 Engineering System Manual
- Siemens Industry Online Support FAQ 22533814 - Structure and Addressing of SFC Data Blocks
Related Articles
- Configuring Dynamic SFC Step Execution Times from WinCC in SIMATIC PCS 7
- Resolving SFC Calculation Function Execution Failures in SIMATIC PCS 7 v8.2
- Migrating Process Tag Types (PTT) to Control Module Types (CMT) in SIMATIC PCS 7 v8.0
Related Tags
- PCS7_SFC
- SFC_Compilation
- Chart_Reference_Data
- Instance_DB
- FB300
- S7_Resources
- Step_Sequencer