Developing Custom APL Faceplates for Blocks Compiled from CFC Charts in PCS 7
In SIMATIC PCS 7, converting a complex CFC chart containing multiple interconnected blocks into a reusable Function Block (FB) and binding it to a custom WinCC faceplate requires compiling the chart as a block type and adhering to Advanced Process Library (APL) naming and structure conventions. Once compiled via "Chart -> Compile -> Chart as Block Type", the new FB must have Operator Communication and Monitoring (OCM) attributes (S7_m_c := 'true') declared on its interface. In WinCC, the companion faceplate is built using standard modular template screens (@PG_<BlockType>.pdl for the main frame, @PG_<BlockType>_Standard.pdl for process controls) and bound to a custom block icon in @PCS7Typicals.pdl via TagPrefix linking.
Table of Contents
- Compiling a CFC Chart as a Block Type
- Configuring OCM System Attributes on Block Parameters
- APL Modular Faceplate Architecture and File Conventions
- Designing Block Icons and TagPrefix Binding in WinCC
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Compiling a CFC Chart as a Block Type
In large-scale process automation projects, engineering teams frequently design standardized multi-block equipment controls—such as specialized chemical dosing skids, packaging line handshakes, or composite motor-valve trains. Rather than duplicating dozens of individual charts, PCS 7 allows engineers to encapsulate the entire chart into an autonomous, compiled Function Block Type:
- In the Continuous Function Chart (CFC) Editor, create the complete control logic.
- Route external inputs and outputs to the chart boundary (Chart I/O).
- In CFC Editor, select Chart -> Compile -> Chart as Block Type....
- Define the block parameters:
- FB Number: Assign an available user FB number (e.g.,FB2100within user range FB1–FB2000 or FB2048+).
- Symbolic Name: Provide a descriptive block name (e.g.,DoseSeq).
- Family: Assign a library family name (e.g.,UserLib). - Upon successful compilation, the new FB is stored in the project block folder and becomes available in the CFC block catalog for drag-and-drop instantiation.
Configuring OCM System Attributes on Block Parameters
For WinCC to generate tags automatically during OS compilation, the compiled block and its interface parameters must declare Operator Communication and Monitoring (OCM) attributes:
{ S7_m_c := 'true' }PV_Out { S7_m_c := 'true' } : REAL;ManModLi { S7_m_c := 'true' } : BOOL;OutAna { S7_m_c := 'true'; S7_xm_c := 'Value,true;' } : AnaVal;Value to WinCCMsgEvId { S7_server := 'alarm_archiv'; S7_a_type := 'alarm_8p' } : DWORD;When the chart is compiled as a block type, configure these attributes under the Chart I/O properties before compilation, or update the generated block properties in the SIMATIC Manager block folder.
APL Modular Faceplate Architecture and File Conventions
SIMATIC PCS 7 APL utilizes a standardized modular architecture for operator faceplates. To create a faceplate for custom block DoseSeq, create the following files in the OS project directory using Graphics Designer:
@PG_DoseSeq.pdl(Main Container): The primary window frame hosting the header bar (batch allocations, instance name), view navigation buttons (Standard, Maintenance, Limits), and the central Picture Window.@PG_DoseSeq_Standard.pdl(Standard View): The working view displayed by default when an operator clicks the block icon. Displays process values, setpoints, auto/manual toggles, and status animations.@PG_DoseSeq_Maintenance.pdl(Maintenance View): Optional auxiliary view for instrument maintenance, simulation modes, and bypass commands.@PG_DoseSeq_Preview.pdl(Preview View): Displays operating permissions and upcoming interlocking conditions.
The main container @PG_DoseSeq.pdl uses standard Split Screen Manager C-scripts (SSMOpenTopField2 / SSMGetPictureName) to dynamically swap auxiliary views into its central picture window.
Designing Block Icons and TagPrefix Binding in WinCC
The link between the process graphic and the faceplate is established via the Block Icon:
- Open
@PCS7Typicals<Project>.pdl(or create a custom typical file). - Create or copy an existing APL block icon.
- Configure the block icon object properties:
-type: Set strictly to@DoseSeq(or@DoseSeq/1for variant 1).
-servernames: Set toPCS7 DoseSeq Control.
-tagname: Leave blank; the PCS 7 block icon wizard automatically populates this with the hierarchical chart path during icon generation. - When an operator clicks the block icon in WinCC Runtime, standard APL scripts read the object's
tagname, assign it to the faceplate picture window'sTagPrefix, and open@PG_DoseSeq.pdl. - Inside the faceplate views, all dynamic objects reference relative tag names (e.g.,
.PV_Out#Valueor.ManModLi#Value), which automatically resolve against the assignedTagPrefix.
Verification
To verify custom block and faceplate integration:
1. In SIMATIC Manager, instantiate the custom block in a CFC chart; assign instance name Dose_Unit1.
2. Assign the chart folder to the OS and execute Compile OS (Changes only).
3. In SIMATIC Manager, right-click the plant folder and select Plant Hierarchy -> Create/Update Block Icons.
4. Open the target process picture in WinCC Runtime; verify that the newly generated block icon appears.
5. Click the block icon; confirm that the custom faceplate opens instantly, populates live process data, and executes operator commands cleanly.
Limitations and Operational Precautions
Never hardcode absolute tag names (e.g., Plant1/Area2/Dose_Unit1.PV_Out) inside custom faceplate sub-pictures (@PG_*_Standard.pdl). Hardcoded tag names prevent the faceplate from being reused across multiple block instances. All dynamic dialogs and scripts must utilize relative tag names with a leading dot (e.g., .PV_Out), relying exclusively on the WinCC TagPrefix mechanism.
Engineer FAQ
Can a block compiled from a CFC chart contain other sub-blocks?
Yes. When compiling a chart as a block type, all underlying elementary blocks, APL blocks, and logic gates are encapsulated within the newly generated function block.
Why does clicking my custom block icon fail to open the faceplate?
Verify that @PG_<BlockType>.pdl exists in the GraCS directory and that the type property of the block icon matches @<BlockType> exactly (case-sensitive).
Does compiling a chart as a block type consume Process Objects?
The compiled block itself will consume 1 AS RT PO and 1 OS RT PO if it contains S7_m_c := 'true' and generates alarms via Alarm_8P.
Technical References
- SIMATIC PCS 7 Programming Instructions for Blocks (A5E33814038)
- SIMATIC PCS 7 APL Faceplate Design Guide (A5E33814036)
- SIMATIC WinCC V7.4 Graphics Designer Manual (A5E37536412)
Related Articles
- Configuring S7_m_c and S7_xm_c Attributes for Custom Structured Blocks in PCS 7
- Replicating Graphic Pictures and Arranging Block Icons with IEA in PCS 7
- Customizing Interlock Button Labels on PCS 7 APL Motor Faceplates
Related Tags
- Chart as Block Type
- Custom Faceplate
- Block Icons
- APL Architecture
- TagPrefix