Creating Custom APL-Style Faceplate Popups and Block Icons in SIMATIC PCS 7 WinCC
Developing custom APL-style faceplate popups and block icons in SIMATIC PCS 7 WinCC requires synchronizing controller SCL function blocks with the WinCC Faceplate Designer and template graphic libraries. Engineers must structure block interfaces with system attributes (such as S7_m_c for OS communication), define matching structured tag types in WinCC Tag Management, design custom block icons in @PCS7Typicals.pdl, and create modular faceplate views (@PG_.pdl). When an operator clicks the block icon, standard APL C-scripts parse the technological tag prefix and dynamically launch the popup window.
Table of Contents
- Architecture of APL Faceplates and Technological Popups
- STEP 7 Block Interface Design and S7_m_c Attributes
- Designing Custom Block Icons in @PCS7Typicals.pdl
- Building Faceplate Views in Graphics Designer (@PG_*.pdl)
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture of APL Faceplates and Technological Popups
In SIMATIC PCS 7, operator interaction conforms to the Advanced Process Library (APL) window management architecture:
- Block Icon (
@PCS7Typicals.pdl/@Template.pdl): A compact graphic object placed on process screens showing equipment status, alarms, and operating modes. - Faceplate Top Container (
@PG_<Type>.pdl): The master window frame containing the title bar, view selection buttons (Standard, Alarm, Trend, Parameter, Memo), and authorization icons. - Standard View (
@PG_<Type>_Standard.pdl): The primary interactive popup showing live telemetry (e.g., three timestamps and three analog values) and command buttons. - Dynamic Tag Binding via Tag Prefix: APL faceplates do not contain hardcoded tag names. When an operator clicks a block icon, the internal C-script
APL_OpenFaceplate()retrieves the technological tag name (e.g.,Unit1/Motor01) and assigns it as the Tag Prefix of the popup window, dynamically binding all controls to the target block instance.
STEP 7 Block Interface Design and S7_m_c Attributes
To enable automatic WinCC tag generation and faceplate connectivity, create the custom SCL function block (FB) with proper system attributes:
FUNCTION_BLOCK FB2001
TITLE = 'CustomMultiValMon'
{ S7_m_c := 'true' }
AUTHOR : 'Eng'
VAR_INPUT
Val1 { S7_m_c := 'true' } : REAL := 0.0;
Val2 { S7_m_c := 'true' } : REAL := 0.0;
Val3 { S7_m_c := 'true' } : REAL := 0.0;
Time1 { S7_m_c := 'true' } : DATE_AND_TIME;
Time2 { S7_m_c := 'true' } : DATE_AND_TIME;
Time3 { S7_m_c := 'true' } : DATE_AND_TIME;
Op_Level { S7_m_c := 'true' } : INT := 5;
END_VAR
VAR_OUTPUT
QError { S7_m_c := 'true' } : BOOL := FALSE;
END_VAR
When the CFC chart is compiled and the OS is compiled, the compiler automatically creates a structured tag type named CustomMultiValMon in WinCC Tag Management.
Designing Custom Block Icons in @PCS7Typicals.pdl
To ensure the OS compiler automatically generates block icons during compilation:
- In WinCC Graphics Designer, open the master template picture
@PCS7Typicals.pdl(or@PCS7Typicals_Custom.pdl). - Copy an existing APL block icon (e.g.,
@MonAnL/1) to serve as the design foundation. - Open Object Properties for the new customized object:
*type: Set to@CustomMultiValMon/1. The string before the slash must match your SCL block name exactly.
*servername: Set toPCS7 CustomMultiValMon Control.
*tag: Connect to a sample tag or leave as template property. - Add the click event: Under Event -> Mouse -> Mouse Click, verify that the APL standard C-script is called:
c // APL Standard Icon Click Action #include "apdefap.h" void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { PCS7_OpenInputBox(lpszPictureName, lpszObjectName); } - Save
@PCS7Typicals.pdl.
Building Faceplate Views in Graphics Designer (@PG_*.pdl)
Create the faceplate view screens according to APL naming conventions:
- Create the Master View (
@PG_CustomMultiValMon.pdl):
* Copy@PG_MonAnL.pdland save as@PG_CustomMultiValMon.pdl.
* Configure view buttons to load@PG_CustomMultiValMon_Standard.pdl. - Create the Standard View (
@PG_CustomMultiValMon_Standard.pdl):
* Create an empty picture sized 400x300 pixels.
* Insert Static Text labels: "Timestamp 1", "Value 1", etc.
* Insert I/O Fields for analog values:- Set Data Format to
Floating-Point. - Under Output Value -> Dynamic, assign tag
.Val1(notice the leading period:.Val1binds to<TagPrefix>.Val1). - Insert I/O Fields for timestamps:
- Set Data Format to
Date/Time. - Dynamically link to
.Time1.
- Set Data Format to
- Save all
.pdlfiles in the WinCC projectGraCSdirectory.
Verification
Confirm custom faceplate instantiation and operation:
- OS Compilation:
* Instantiate the custom SCL block in a CFC chart within the Plant Hierarchy.
* Compile charts and run Compile OS (Scope: Changes only).
* Confirm that the compiler generates the block icon on the process screen. - Runtime Interaction Test:
* Open the WinCC process graphic in runtime.
* Verify that the block icon displays live values.
* Click the block icon: confirm that@PG_CustomMultiValMon.pdlopens promptly.
* Verify that all three dates and three analog values display matching PLC data dynamically.
Limitations and Operational Precautions
- Template Protection: Never modify
@PCS7Typicals.pdlwithout maintaining backup copies; creating a project-specific@PCS7Typicals_Project.pdlis recommended to prevent OS Project Editor updates from overwriting custom icons. - Strict Tag Prefix Syntax: All dynamic links inside
@PG_*_Standard.pdlmust begin with a period (.Val1,.Time1) to allow dynamic binding to the window Tag Prefix. - Process Object Consumption: Custom technological function blocks configured with
S7_m_c := 'true'consume standard AS Process Object (PO) licenses upon compilation.
Engineer FAQ
- What system attribute in SCL exposes block parameters to WinCC?
The attribute{ S7_m_c := 'true' }placed on the block header and individual variables. - What naming convention is required for custom APL faceplates?
The master container must be named@PG_<BlockType>.pdland the standard view@PG_<BlockType>_Standard.pdl. - How do APL faceplates link to specific equipment instances dynamically?
The block icon passes the instance tag name to the faceplate window as a Tag Prefix; controls inside the faceplate reference tags using relative syntax (e.g.,.Val1). - Where are custom block icons stored so the OS compiler can find them?
In@PCS7Typicals.pdlor a custom typicals file (e.g.,@PCS7Typicals_Custom.pdl) in the projectGraCSfolder. - What attribute in the block icon links it to the SCL block type?
Thetypeproperty in the block icon must be set to@<BlockName>/<Variant>, such as@CustomMultiValMon/1. - Can custom faceplates display DATE_AND_TIME variables?
Yes, WinCC I/O fields can be formatted as Date/Time to render S7DATE_AND_TIMEdata structures natively. - Which script opens an APL faceplate when an icon is clicked?
The standard APL scriptPCS7_OpenInputBox()orAPL_OpenFaceplate()executed on the mouse click event. - Does creating a custom faceplate require C-scripting?
Basic faceplates can be created using standard dynamic tag linking and WinCC Faceplate Designer without writing complex custom C-scripts. - How do I prevent my custom block icons from being overwritten during upgrades?
Create a custom typicals file (e.g.,@PCS7Typicals_MyPlant.pdl) and register it in the OS Project Editor. - What user authorization level is required to modify values on custom faceplates?
Configuring theOp_Levelparameter on the block allows mapping operations to WinCC authorization levels (1 to 16).
Technical References
- Siemens Industry Online Support (SIOS) Portal: How do you create custom block icons and faceplates for SIMATIC PCS 7? (Entry ID: 68679830).
- SIMATIC PCS 7 Faceplate Designer Manual, Siemens AG.
- SIMATIC WinCC V7.5 Information System - Working with Process Pictures and ActiveX.
Related Articles
- Resolving Disabled APL_OP_BUTTON Controls in Custom WinCC Faceplates Without PLC Binding
- Integrating .NET Windows Forms Chart Controls into SIMATIC PCS 7 WinCC Displays
Related Tags
PCS 7, WinCC, APL, Faceplates, Block Icons, SCL, Graphics Designer, Custom Blocks