Developing Custom APL Block Icons and Faceplates Linked to SCL Function Blocks in PCS 7
In SIMATIC PCS 7 V8.1, developing custom block icons and faceplates for user-created SCL function blocks requires adhering to the APL style architecture and WinCC OS compilation rules. The block icon must be built as a Customized Object inside @PCS7TypicalsAPLV8.pdl (or a project-specific typical file) with standard properties such as type, tag, and servername. The faceplate is constructed using top-level (@PG_.pdl) and view-specific (@PG__Standard.pdl) pictures. Linking is achieved during OS compilation: when the function block possesses the S7_m_c attribute, the OS wizard compiles instance tags, and clicking the block icon invokes the APL_OpenFaceplate script passing the block's tag prefix to instantiate the faceplate.
Table of Contents
- APL Block Icon and Faceplate Architectural Framework
- Prerequisites for Custom SCL Function Blocks
- Custom Block Icon and Faceplate Component Matrix
- Step-by-Step Procedure to Create and Link Custom APL Icons and Faceplates
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
APL Block Icon and Faceplate Architectural Framework
The SIMATIC PCS 7 Advanced Process Library (APL) provides a standardized Human-Machine Interface (HMI) visual framework based on two fundamental elements: Block Icons (Typicals) placed on process screens for rapid overview, and Faceplates (Picture-in-Picture dialogs) opened by operators to monitor and manipulate detailed technological parameters.
Block icons in PCS 7 are implemented as WinCC Customized Objects (Anwenderobjekte) residing in template files named @PCS7TypicalsAPLV8.pdl (system baseline) or @PCS7Typicals_Custom.pdl (user overrides). During the Create/Update Block Icons wizard run, WinCC reads all CFC function blocks possessing HMI attributes (S7_m_c = 'true'), instantiates the matching typical from the template file, and connects the instance tag path to the icon interface.
Faceplates utilize a hierarchical multi-picture structure managed by the WinCC Picture Tree Manager and standard APL C-scripts. A faceplate comprises three mandatory graphic layers: the window frame (@PG_<Type>.pdl), the overview bar (@PG_<Type>_Overview.pdl), and individual operational views such as the standard view (@PG_<Type>_Standard.pdl) and maintenance view (@PG_<Type>_Maintenance.pdl).
Prerequisites for Custom SCL Function Blocks
Before constructing graphic objects in WinCC Graphics Designer, the SCL Function Block (FB) in STEP 7 must be programmed with the mandatory PCS 7 system attributes:
-
Block-Level Attributes: The FB header must contain
S7_m_c := 'true'to mark the block for OS compilation,S7_blockview := 'big'to define the CFC graphic display, andS7_driver := 'false'. -
I/O-Level Attributes: Every parameter required in WinCC must carry the attribute
S7_m_c := 'true'. For process values, include engineering units (S7_unit := '%') and decimal places (S7_shortcut := 'Level'). -
Standard APL Interface Signatures: If leveraging standard APL scripts, include standard status double-words (
Status1,Status2), operating mode structures (OpMod_Aut,OpMod_Man), and OS message parameters (MsgEvId). Once programmed, compile the SCL source and insert the block into a CFC chart.
Custom Block Icon and Faceplate Component Matrix
The following table summarizes the files, naming conventions, and object properties required for custom APL implementations:
@PCS7Typicals_Custom.pdltype (@CustomFB/1), tag, servername@PG_CustomFB.pdlTagPrefix, TopField, StandardView@PG_CustomFB_Overview.pdlGroupDisplay, Batch, Authorization@PG_CustomFB_Standard.pdlPV_In, SP_In, Man_Op, Aut_OpAPL_OpenFaceplate (C-Action)lpszPictureName, lpszObjectNameStep-by-Step Procedure to Create and Link Custom APL Icons and Faceplates
To create a custom block icon and faceplate and link them seamlessly in PCS 7 V8.1:
-
Create the Project Typicals File:
- In WinCC Explorer on the Engineering Station, open Graphics Designer.
- Save a copy of@PCS7TypicalsAPLV8.pdlas@PCS7Typicals_Project.pdl(or@PCS7Typicals_Custom.pdl). This prevents Siemens system updates from overwriting your custom templates.
- Open@PCS7Typicals_Project.pdl. Copy an existing simple APL icon (e.g.,@MotL/1or@OpAnL/1) to use as a structural base. -
Configure the Customized Object Interface:
- Right-click the copied object and select Configuration Dialog.
- Set the propertytypeto@CustomFB/1(whereCustomFBmatches the exact name of your SCL Function Block, and/1indicates icon variant 1).
- Under theGeneralproperty group, setservernametoPCS7 CustomFB Control.
- Under theLinksproperty group, map the dynamic status tags (e.g.,Status1,Status2,PV_Out.Value) to the internal visual indicators.
- Under the Events tab on the Customized Object, select Mouse Click and verify that it contains the standard C-action:APL_OpenFaceplate(lpszPictureName, lpszObjectName);.
- Save and close@PCS7Typicals_Project.pdl. -
Build the Faceplate PDL Files:
- Open@PG_MotL.pdlin Graphics Designer and save it as@PG_CustomFB.pdl.
- Save@PG_MotL_Standard.pdlas@PG_CustomFB_Standard.pdl.
- In@PG_CustomFB.pdl, select the main view container and set its default picture property to@PG_CustomFB_Standard.pdl.
- In@PG_CustomFB_Standard.pdl, remove irrelevant motor elements and add I/O fields, bar graphs, or buttons. In all dynamic tag bindings, specify only the relative dot-prefixed tag name (e.g.,.PV_Out#Value,.SP_In#Value,.ManAct#Value). Do not specify static chart names, as the faceplate engine supplies theTagPrefixat runtime.
- Save all@PG_CustomFB*.pdlfiles in the OS project'sGraCSdirectory. -
Compile the OS and Generate Block Icons:
- In SIMATIC Manager, right-click the OS project and select Compile.
- Once compilation completes, open the target process graphic in Graphics Designer.
- In SIMATIC Manager, select the chart folder and execute Options -> Plant Hierarchy -> Create/Update Block Icons.
- The wizard scans the project, detects instances ofCustomFB, copies the@CustomFB/1icon from@PCS7Typicals_Project.pdl, assigns the instance tag name totag, and inserts the icon into the designated process picture.
Verification
Verify the custom icon and faceplate integration:
1. Open WinCC Runtime on the ES or OS Single Station.
2. Navigate to the process screen; confirm that the custom block icon displays live process data (e.g., actual analog value and status icon colors).
3. Click the block icon; confirm that @PG_CustomFB.pdl opens immediately in a floating window with the correct tag prefix populated.
4. Toggle a manual command or change a setpoint in the faceplate; verify that the value propagates directly to the controller instance DB and updates the block icon.
Limitations and Operational Precautions
- Template Overwrite Hazard: Never modify
@PCS7TypicalsAPLV8.pdldirectly; future PCS 7 software updates or OS migrations will overwrite standard system files. - Tag Prefix Case Sensitivity: Relative tag bindings in faceplate views (e.g.,
.PV_Out#Value) are strictly case-sensitive and must match the WinCC tag database exactly. - Style Guide Compliance: Custom faceplates must strictly follow the PCS 7 APL Style Guide regarding colors, font sizes, and button margins to maintain ergonomic consistency for plant operators.
Engineer FAQ
How does PCS 7 know which block icon template to instantiate for a custom block?
The OS compilation wizard reads the block name in CFC and matches it to the 'type' property of Customized Objects formatted as '@/'.
Why are dynamic tags failing to update inside my custom faceplate?
Tags inside faceplate views must use relative dot-syntax (e.g., '.PV_Out#Value'). If an absolute tag name is hardcoded, the faceplate fails to bind to different instances.
Can I use VB scripts instead of C-scripts for APL faceplate opening?
APL core navigation relies on Siemens standard C-scripts (APL_OpenFaceplate). Mixing VBScript into standard APL picture opening can break picture cache and multi-monitor management.
Where do I place custom typical PDL files so the wizard detects them?
Place '@PCS7Typicals_Custom.pdl' in the OS project's 'GraCS' directory. The block icon wizard searches project typicals before falling back to system typicals.
Technical References
- SIMATIC PCS 7 APL Style Guide Engineering Manual (A5E03598762-01)
- SIMATIC PCS 7 Programming Instructions for Blocks (A5E39145658-AC)
- SIMATIC HMI WinCC V7.4 Graphics Designer Manual (A5E37536408-AA)
Related Articles
- Customizing APL Block Icons Without Breaking Automatic Wizard Interconnections in PCS 7
- Disabling OK Confirmation Buttons on APL Faceplates in SIMATIC PCS 7
- Why S7_xm_c Structure Tags Fail in Shared Data Blocks but Work in Function Blocks in PCS 7
Related Tags
- Block Icons
- Faceplates
- APL
- WinCC Typicals
- Customized Objects
- SCL Blocks