Configuring SCL Attributes and WinCC Block Icons for Custom Technological Blocks in SIMATIC PCS 7
In SIMATIC PCS 7, when a custom Function Block (FB) created in S7-SCL and placed in a CFC chart fails to automatically generate its block icon in target WinCC pictures during compilation, the issue originates from missing compiler system attributes in the SCL header, improper object grouping in the template picture, or missing Plant Hierarchy derivation settings. The SCL source must contain { S7_m_c := 'true' } on the FB header and critical parameters, the block icon in @PCS7Typicals.pdl must possess the user attribute type formatted as @<FB_Name>/<Index>, and the picture must have 'Derive block icons' enabled.
Table of Contents
- SCL Compiler System Attributes for WinCC Operator Control
- Template Picture Configuration in @PCS7Typicals.pdl
- Step-by-Step Block Icon Generation Workflow
- Attribute Configuration and Diagnostic Checklist Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SCL Compiler System Attributes for WinCC Operator Control
When developing technological blocks in S7-SCL for SIMATIC PCS 7:
* S7_m_c (Monitoring and Control): Informs the STEP 7 compiler to expose the block and its tagged variables to WinCC Operator Control and Monitoring. The FB header must contain { S7_m_c := 'true' }.
* Block View Attribute: Declaring { S7_blockview := 'status' } identifies the block as a status-driven technological element.
* Variable Attributes: Any variable exposed to the block icon (e.g. Status, Fault, Run) must have { S7_m_c := 'true' } and optionally { S7_string := 'true' } or { S7_tag := 'true' }.
Template Picture Configuration in @PCS7Typicals.pdl
During the AS-OS compilation and block icon generation process:
1. The Plant Hierarchy engine scans @PCS7Typicals.pdl (or @template.pdl) located in the project's GraCS folder.
2. It searches for customized objects containing the user-defined property type.
3. Naming Convention: The type property must exactly match @<BlockName>/<Variant>:
* Example: If the SCL block is FUNCTION_BLOCK FB1001 with symbol name CustomPump, the template icon property type must be @CustomPump/1.
4. If the leading @ or the index /1 is omitted, the icon generator skips the object without reporting a syntax error.
Step-by-Step Block Icon Generation Workflow
Follow this procedure to successfully configure and generate custom block icons:
[Phase 1: Configure S7-SCL Source Header and Variables]
│ • In S7-SCL, configure the block declaration:
│ FUNCTION_BLOCK FB1001
│ TITLE = 'Custom_Pump_Control'
│ { S7_m_c := 'true'; S7_tasklist := 'OB100'; S7_blockview := 'status' }
│ VAR_INPUT
│ Run { S7_m_c := 'true' } : BOOL;
│ Trip { S7_m_c := 'true' } : BOOL;
│ END_VAR
│ • Compile the SCL source; verify FB1001 is created in the Blocks folder
│
[Phase 2: Create Template Block Icon in Graphics Designer]
│ • In WinCC Explorer, open GraCS -> @PCS7Typicals.pdl
│ • Create the customized object containing dynamic status animations
│ • In Object Properties -> User Attributes:
│ - Add / Verify Property: "type"
│ - Set Value: "@CustomPump/1"
│ • Save and close @PCS7Typicals.pdl
│
[Phase 3: Place Block in CFC and Generate Icons]
│ • In SIMATIC Manager: Open CFC -> Insert CustomPump FB from catalog
│ • In Block Properties: Confirm "OCM possible" is checked
│ • In Plant View: Select picture object -> Properties -> "Block Icons" tab:
│ - Check: "Derive block icons from the plant hierarchy"
│ • Right-click picture -> Plant Hierarchy -> "Create/update block icons"
│ • The custom block icon appears in the picture, fully bound!
Attribute Configuration and Diagnostic Checklist Matrix
Verify the following attributes to resolve missing icon generation:
{ S7_m_c := 'true' }'true'{ S7_blockview := 'status' }'status'OCM possibletype property@CustomPump/1Derive block icons...Verification
To confirm that the custom block icon generates properly:
1. In SIMATIC Manager Plant View, select Plant Hierarchy -> Create/update block icons.
2. Review the generation log; verify that it states: Created 1 block icon for [HierarchyPath]/CustomPump.
3. Open the target .pdl picture in Graphics Designer; confirm that the icon is placed inside the drawing area.
4. Verify that the icon's tag property is populated with the correct hierarchical path.
5. In WinCC Runtime, verify that clicking the block icon opens the associated custom faceplate.
Limitations and Operational Precautions
Never modify default Siemens template pictures in the global installation directories. Always make modifications inside the active WinCC project GraCS directory. If the block interface changes in S7-SCL, execute 'Update Block Types' in CFC and recompile the OS with 'Tags and messages' before re-running block icon generation.
Engineer FAQ
Why must the block icon type start with '@'?
The PCS 7 Plant Hierarchy icon creation script specifically parses strings beginning with @ to identify system and technological block types.
Can I create multiple block icon styles for one custom block?
Yes. Create additional icons in @PCS7Typicals.pdl with types @CustomPump/2, @CustomPump/3. In CFC block properties, enter 2 or 3 in the 'Block icon' attribute field.
What happens if 'Create/update block icons' is run a second time?
Existing icons remain in their assigned coordinates, while new block instances are added. Updated tag interconnections are refreshed without overwriting icon positions.
How do I link the block icon to open my custom faceplate?
Configure the icon's mouse click event or standard PCS 7 open faceplate C-script to call @pg_<CustomPump>.pdl using the object tag prefix.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library Style Guide - A5E03657731-01
- SIMATIC Process Control System PCS 7 Engineering System Manual - A5E36188448-AB
- Siemens Industry Online Support (SIOS) Entry ID 109780813 - Block Icon Creation
Related Articles
- Troubleshooting Automatic Block Icon Generation Failures for Custom SCL Blocks in SIMATIC PCS 7 WinCC
- Creating Custom Faceplates and Block Icons from Scratch in SIMATIC PCS 7 WinCC
- Developing Custom APL Blocks in S7-SCL - System Attributes, Automatic Block Icons, and Faceplate Binding in SIMATIC PCS 7
Related Tags
- Block Icon
- S7-SCL Attributes
- S7_m_c
- @PCS7Typicals
- Plant Hierarchy