Creating Custom APL-Compliant Block Icons and Faceplates for SCL Function Blocks in SIMATIC PCS 7

Creating Custom APL-Compliant Block Icons and Faceplates for SCL Function Blocks in SIMATIC PCS 7

In SIMATIC PCS 7 environments, developing custom block icons and faceplates for proprietary SCL function blocks conforming to the Advanced Process Library (APL) style guide requires structuring the SCL code with standard attributes (S7_m_c, Status words, and message interfaces) and constructing modular WinCC graphics. Unlike standard WinCC faceplate types (BST) that utilize single-file .fpt containers, APL faceplates use a multi-screen popup framework assembled dynamically from standardized header, view, and operational .pdl files. Custom block icons are configured as User Objects within @PCS7TypicalsAPLV8.pdl to support automated Plant Hierarchy generation.

Table of Contents

APL Multi-Screen Faceplate Architecture vs WinCC Faceplate Types

Engineers transitioning from standard WinCC or TIA Portal to PCS 7 APL frequently confuse WinCC Faceplate Types with PCS 7 APL Faceplates:
- WinCC Basic / BST Faceplate Types (.fpt): Single monolithic graphic objects encapsulating tags and visuals inside a sealed container. Suitable for simple panels, but lack native integration with PCS 7 alarm logging, operator authorizations, and plant hierarchy navigation.
- PCS 7 APL Faceplate Framework: A modular, multi-window screen assembly. An APL faceplate popup is not a single file; it is a dynamic composition of standardized screen templates assembled at runtime inside a master popup frame (@PG_APL_Standard.pdl or @PG_APL_OA.pdl). Different operational tabs (Standard, Maintenance, Limit, Alarm, Trend) load independent .pdl files into child picture windows.

Structuring SCL Code for APL Compatibility and WinCC Exposure

To communicate cleanly with WinCC block icons and faceplates, the underlying SCL function block must implement standardized attributes:

  1. Tag Management Exposure (S7_m_c): Add { S7_m_c := 'true' } to the block header and to every input/output variable that requires WinCC visibility.
  2. Status Word Packing: Compress boolean operational states (Run, Stop, Fault, Sim, Local, Auto, Interlocked) into 32-bit DWORD status words (Status1, Status2). A single tag transfer updates all visual indicators on the block icon, minimizing communication bandwidth.
  3. Integrated Alarm Interface: Incorporate ALARM_8P function block calls inside the SCL code to manage timestamped alarms and operator acknowledgment.

Designing Custom Block Icons in @PCS7TypicalsAPL

To support automated block icon generation during OS compilation:

  1. Open Template Picture: In the OS project or Master Data Library, open @PCS7TypicalsAPLV8.pdl (or create @PCS7Typicals<Project>.pdl).
  2. Create User Object: Group graphical components (status display, motor symbol, alarm badge, authorization padlock) into a WinCC User Object.
  3. Configure Standard Properties:
    - type: Assign a unique type string formatted as @<BlockName>/<Variant> (e.g. @CustomMot/1).
    - Tag: Linked to the technological tag path (e.g., .Status1).
    - TagPrefix: Parameterized dynamically by the Plant Hierarchy.
    - Servername: Identifies the server package.
  4. Dynamic Status Linking: Link the motor icon's color and animation to the bit mask of Status1 using dynamic dialogs or the WinCC Status Display object.

Assembling Faceplate Views and Standard Dialogs

An APL faceplate popup requires creating specific standardized graphic files:

  • Standard View (@PG_<BlockType>_Standard.pdl): Displays main operating states, start/stop buttons, manual/auto selectors, and actual operating values.
  • Maintenance View (@PG_<BlockType>_Maintenance.pdl): Houses maintenance bypasses, simulation toggles, and total operating hour displays.
  • Master Popup Frame: At runtime, clicking the block icon triggers the C-script function APL_OpenFaceplate(). The script reads the object's type, opens @PG_APL_Standard.pdl, sets the window title to the block tag name, and loads the corresponding @PG_<BlockType>_Standard.pdl into the view area.

APL Component and File Naming Convention Table

The following table details the mandatory naming conventions for custom APL faceplate development:

Component RoleStandard File / Object NamePurpose in PCS 7 RuntimeMaster Template Picture@PCS7TypicalsAPLV8.pdlRepository for automated block icon generationCustom Block Icon User Object@CustomMot/1Graphical instance placed into plant process picturesMaster Faceplate Frame@PG_APL_Standard.pdlOuter window providing title bar, alarm line, and tab barStandard Operating View@PG_CustomMot_Standard.pdlCore operator controls and operating state displaysMaintenance View@PG_CustomMot_Maintenance.pdlTechnician overrides, simulation controls, and diagnosticsView Structure Script@PG_CustomMot_View.pdlConfiguration file declaring which tabs are visible

Note: For detailed graphical rules and color palettes, refer to the official Siemens PCS 7 APL Style Guide.

Verification

Verify custom block icon and faceplate operation:
1. In SIMATIC Manager Plant View, run Plant Hierarchy > Create/update block icons; confirm the custom icon instantiates into the target process picture.
2. Launch WinCC Runtime and open the process picture.
3. Confirm that the motor block icon displays the correct color (e.g., green for run, gray for stop, red for fault) driven by Status1.
4. Click the block icon; verify that the APL popup frame opens with the correct tag name in the header and loads the custom @PG_CustomMot_Standard.pdl view cleanly.

Limitations and Operational Precautions

Key precautions when creating custom APL objects:
- Modifying standard Siemens template files (such as @PCS7TypicalsAPLV8.pdl) directly will cause changes to be overwritten during PCS 7 library updates. Always create a project-specific template file (e.g., @PCS7TypicalsMyPlant.pdl) and prioritize it in OS Project Editor.
- Ensure all custom C-scripts follow APL multi-client conventions; avoid hardcoding server prefixes or computer names in faceplate scripts.
- Ensure SCL status word bit alignments match the dynamic dialog bit masks in WinCC to prevent inverted or invalid graphical state indications.

Engineer FAQ

Why does clicking my custom block icon fail to open the faceplate?

Verify that the User Object has property type configured correctly and that the script event calls APL_OpenFaceplate. Ensure the file @PG_<BlockType>_Standard.pdl exists in the GraCS directory.

Can I use standard WinCC .fpt faceplate types in PCS 7?

You can, but they will not integrate with standard PCS 7 features like automatic Plant Hierarchy placement, @Overview1.pdl alarm loop-in, or multi-screen client navigation.

What is the purpose of the @PG__View.pdl file?

It acts as a configuration table specifying which operational tabs (Standard, Alarm, Trend, Maintenance) should appear on the top tab selector of the faceplate frame.

Technical References

Related Articles

Related Tags

  • APL Styleguide
  • Block Icons
  • Faceplates
  • SCL
  • User Objects
6 respuestas