Developing Custom APL Block Icons and Faceplates Linked to SCL Function Blocks in PCS 7

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

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:

  1. 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, and S7_driver := 'false'.

  2. 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').

  3. 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:

Component TypeFile / Object NamePrimary Role in PCS 7Key Interface PropertiesBlock Icon Template@PCS7Typicals_Custom.pdlMaster template for automatic icon generationtype (@CustomFB/1), tag, servernameTop Faceplate Window@PG_CustomFB.pdlTop-level frame hosting view containersTagPrefix, TopField, StandardViewOverview Bar@PG_CustomFB_Overview.pdlHeader bar showing alarms, locks, and modesGroupDisplay, Batch, AuthorizationStandard View@PG_CustomFB_Standard.pdlPrimary operator control and setpoint entryPV_In, SP_In, Man_Op, Aut_OpClick Event ScriptAPL_OpenFaceplate (C-Action)Event script on block icon opening the faceplatelpszPictureName, lpszObjectName

Step-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:

  1. Create the Project Typicals File:
    - In WinCC Explorer on the Engineering Station, open Graphics Designer.
    - Save a copy of @PCS7TypicalsAPLV8.pdl as @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/1 or @OpAnL/1) to use as a structural base.

  2. Configure the Customized Object Interface:
    - Right-click the copied object and select Configuration Dialog.
    - Set the property type to @CustomFB/1 (where CustomFB matches the exact name of your SCL Function Block, and /1 indicates icon variant 1).
    - Under the General property group, set servername to PCS7 CustomFB Control.
    - Under the Links property 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.

  3. Build the Faceplate PDL Files:
    - Open @PG_MotL.pdl in Graphics Designer and save it as @PG_CustomFB.pdl.
    - Save @PG_MotL_Standard.pdl as @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 the TagPrefix at runtime.
    - Save all @PG_CustomFB*.pdl files in the OS project's GraCS directory.

  4. 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 of CustomFB, copies the @CustomFB/1 icon from @PCS7Typicals_Project.pdl, assigns the instance tag name to tag, 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.pdl directly; 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

Related Articles

Related Tags

  • Block Icons
  • Faceplates
  • APL
  • WinCC Typicals
  • Customized Objects
  • SCL Blocks
6 respuestas