Managing the CFC Block Catalog in SIMATIC PCS 7 - Importing Timers, SCL Sources, and Library Synchronization

Managing the CFC Block Catalog in SIMATIC PCS 7 - Importing Timers, SCL Sources, and Library Synchronization

In SIMATIC PCS 7 CFC, newly compiled SCL function blocks or standard library timers (such as TimerP FB5) do not automatically appear under the 'All blocks' catalog branch until they are imported into the S7 program's chart folder. When an SCL source is compiled, the resulting FB is placed in the offline S7 program's Blocks folder, making it visible under the S7 program branch. To make standard timers or custom blocks available under 'All blocks' or specific family groups, drag the block from the Master Data Library or S7 Program into any CFC chart.

Table of Contents

Structure and Hierarchy of the CFC Block Catalog

The CFC Block Catalog in SIMATIC PCS 7 (v7.1, v8.x, v9.x) organizes automation blocks across three distinct tabs:
* Libraries Tab:
Displays all opened libraries in the project workspace, including the Master Data Library, PCS 7 APL Library, Standard S7 Library, and Redundant Library.
* Blocks Tab (Project Catalog):
Organizes blocks that have already been imported into the active AS chart folder:
* All blocks: Lists every FB and FC currently recognized by the CFC chart database.
* Family: Groups blocks by their declared FAMILY header attribute (e.g., CONTROL, OPERATE, COUNT).
* Author: Groups blocks by their declared AUTHOR attribute (e.g., TIME, ADV_LIB, SIEMENS).
* S7 Program Tab:
Displays all raw FBs and FCs present in the offline Blocks container of the S7 program, including blocks compiled from SCL or AWL/STL that have not yet been instantiated in a CFC chart.

Why Compiled SCL Blocks Appear Only Under S7 Program

When an engineer writes a custom function block in Structured Control Language (SCL) and clicks Compile:
1. The SCL compiler translates the source code into machine code and saves the compiled FB (e.g., FB200) into the offline Blocks folder of the S7 program.
2. At this stage, the block exists in STEP 7, but the CFC chart database has no internal reference to it.
3. Consequently, the block appears exclusively under the S7 Program tab of the catalog.
4. Once the engineer drags FB200 from the S7 Program tab into an open CFC chart, the CFC executive creates internal chart instance records, copies the block interface into the chart database, and registers the block permanently under All blocks and its assigned Family/Author groups.

Block Attribute Classification Matrix (Author, Family, System Attributes)

The table below outlines key block header attributes that determine how blocks are cataloged and processed in CFC:

Attribute KeywordExample ValueCatalog Impact / FunctionRequired for PCS 7 APLFAMILY'CONTROL' / 'TIME'Determines sub-folder grouping under the Family catalog branchYesAUTHOR'ADV_LIB' / 'CUSTOM'Determines sub-folder grouping under the Author catalog branchYesNAME'TimerP' / 'MotL'Defines the symbolic block type name displayed in CFC headersYesVERSION'1.0'Tracks block interface revisions for Delta CompilationsYesS7_m_c := 'true'Boolean attributeMarks internal tags for Operator Control and Monitoring (WinCC)Mandatory for FaceplatesS7_tasklist := 'OB100'Task list attributeInstructs CFC driver generator to insert block into startup OBsOptional

Step-by-Step Procedure to Import Timers and SCL Blocks into CFC

  1. Locate Standard Timer Blocks:
    * Open any CFC chart in SIMATIC Manager.
    * On the left pane, switch to the Libraries tab of the catalog.
    * Expand PCS 7 Library (or Master Data Library).
    * Open the TIME family or author branch to locate TimerP (FB5) or standard pulse timers (PULSE, TON, TOF).
  2. Import into Chart Folder:
    Drag TimerP directly into the open CFC chart. CFC imports the block type into the chart folder automatically.
  3. Locate and Import Custom SCL Blocks:
    * Switch to the S7 Program tab in the catalog.
    * Expand the Blocks folder.
    * Locate your compiled block (e.g., FB200_MotorInterlock).
    * Drag it into the chart.
  4. Verify Catalog Population:
    Switch to the Blocks tab in the catalog. Expand All blocks. Confirm that TimerP and your custom SCL block now appear permanently in the project catalog.

Synchronizing Block Types Across Multiproject Master Data Libraries

In multi-project architectures:
* The Master Data Library (MDL):
Custom SCL blocks and imported library timers should always be placed into the Master Data Library's Blocks folder first.
* Propagating Updates:
In SIMATIC Manager, select the block in the MDL and click Options -> Charts -> Update Block Types. Select all target AS component projects. This ensures that every AS project receives identical block type versions, preventing interface mismatch errors during multi-user engineering.

Verification

To verify that blocks are properly cataloged:
1. Open the CFC Editor. Switch to the Blocks catalog tab.
2. Expand All blocks. Verify that TimerP and custom blocks appear in the alphabetical list.
3. Expand the Family branch. Verify that blocks appear under their declared family names.
4. Drag an instance of the block onto a new sheet. Confirm that all pins, default values, and comments render accurately.
5. Execute a test compilation (Charts -> Compile -> Changes only). Verify compilation succeeds without missing block type errors.

Limitations and Operational Precautions

  • Block Number Collisions: Before compiling custom SCL sources or importing third-party libraries, check the S7 program Blocks folder for number conflicts (e.g., ensuring FB200 is not already used by an APL system block).
  • Interface Change Impacts: If you modify the input/output parameter interface of an SCL block that is already used in CFC charts, you must perform Update Block Types. This may force a full compilation and full AS download if memory layouts shift significantly.
  • Licensing Disclaimer: Utilizing advanced function blocks from specialized libraries (e.g., Industry Library 6ES7658-1EX08-1YB5) requires appropriate engineering and runtime licensing verified via Automation License Manager.

Engineer FAQ

Technical References

Related Articles

Related Tags

  • CFC Block Catalog
  • TimerP
  • SCL Compiler
  • Master Data Library
  • Block Types
  • Update Block Types
8 respuestas