APL Block Protection Architecture, SCL Source Availability, and Faceplate Migration in PCS 7
Siemens does not provide uncompiled SCL source code for standard Advanced Process Library (APL) blocks (such as 'MotL', 'VlvL', or 'PIDConL'); all standard APL blocks are proprietary and delivered pre-compiled with 'KNOW_HOW_PROTECT' enabled. To develop custom technological blocks conforming to the APL look and feel, engineers must follow the official 'SIMATIC PCS 7 APL Styleguide' to build custom Function Blocks in SCL incorporating standard APL structures ('ST', 'Feature', 'OS_Perm'). For existing legacy faceplates from PCS 7 V7.1, WinCC preserves backward-compatible C-scripts (e.g., 'PCS_UpdatePermission_V6'), but migrating to true APL requires adopting '@PCS7TypicalsAPL' templates.
Table of Contents
- Executive Summary
- Architectural and System Mechanics
- Step-by-Step Engineering and Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
As engineering teams migrate legacy DCS plants from PCS 7 V7.1 or V8.0 to modern releases (such as PCS 7 V9.0 or V9.1), adapting older custom blocks to match the aesthetics, faceplate mechanics, and alarm behaviors of the Advanced Process Library (APL) becomes a major priority. Developers frequently search for the original SCL source code of standard APL blocks to use as a coding foundation, only to find that Siemens encrypts and protects all core library FBs. This article explains the architectural reasons behind APL block protection, details the certified methodology for creating APL-compliant custom blocks using SCL, and outlines legacy faceplate coexistence strategies.
Architectural and System Mechanics
APL Architectural Design and Protection Philosophy:
- Proprietary Protection (
KNOW_HOW_PROTECT): - Siemens compiles APL blocks directly from internal development branches and applies block protection to guarantee software execution integrity, runtime performance, and formal certification.
- Direct modification of APL block internals would invalidate system warranty, safety declarations, and online delta download capabilities.
- The APL Interface Standard:
- Rather than modifying core blocks, Siemens defines an open interface specification in the APL Styleguide.
- Custom blocks achieve APL compliance by implementing standard technological structures:
Structwith.Valueand.ST(Signal Status),Feature(Bit-array for operational options),OS_Perm(Operator permission bit-arrays), andMsgEvId(Alarm_8P messaging). - Faceplate Architecture (Classic vs. APL):
- Classic V7.x Faceplates: Built using Faceplate Designer, relying on fixed C-scripts like
PCS_UpdatePermission_V6. - Modern APL Faceplates: Built with 2-tier or 3-tier picture window technology (
@PG_<BlockName>.pdl), dynamic SVG-based styles, and centralized tag prefixing.
Step-by-Step Engineering and Implementation Procedure
Step 1: Study the Official Siemens APL Styleguide
- Download the official manual: SIMATIC Process Control System PCS 7 Advanced Process Library (APL) Styleguide (available on SIOS, Entry ID
109781848). - Review Section 4: 'Creating APL-compliant block types in SCL'.
- Note the mandatory parameters required for WinCC faceplate integration:
OpSt_In,OS_Perm,OS_PermLog,Feature, andStatus.
Step 2: Implement Custom Block Structure in SCL
Create a new SCL source file in the master data library following the APL convention:
FUNCTION_BLOCK FB_CustomAPL_Pump
TITLE = 'Custom APL Pump Controller'
{ S7_m_c := 'true'; S7_tasklist := 'true' }
VERSION : '1.0'
AUTHOR : 'Engineer'
FAMILY : 'UserAPL'
VAR_INPUT
StartAut : STRUCT
Value : BOOL;
ST : BYTE;
END_STRUCT;
Feature : DWORD := 16#0000_0000; // APL Feature Bitmask
END_VAR
VAR_OUTPUT
PmpAct : STRUCT
Value : BOOL;
ST : BYTE;
END_STRUCT;
END_VAR
BEGIN
// Implementation logic conforming to APL standards
END_FUNCTION_BLOCK
Step 3: Maintain Legacy Faceplates During Interim Migration
If project deadlines prevent immediate redesign of legacy faceplates:
1. Confirm that legacy global C-scripts (such as PCS_UpdatePermission_V6) are present in the WinCC project's Library/Global Script/C-Editor.
2. Note that WinCC V7.4/V7.5 continues to execute legacy Faceplate Designer PDLs alongside modern APL faceplates.
Step 4: Build Custom APL Block Icons and Faceplates
- In the GraCS folder, duplicate
@PCS7TypicalsAPLV8.pdland save as@PCS7TypicalsAPLV8UserDefined.pdl. - Create a custom block icon linking to your custom FB name.
- Create matching faceplate PDLs:
@PG_CustomAPL_Pump.pdland@PG_CustomAPL_Pump_Standard.pdl.
Verification
To verify APL compliance of custom blocks:
1. Place the custom block in CFC; verify that technological structure interconnections connect cleanly to standard APL blocks.
2. Compile the OS; verify that block icons generate automatically into WinCC process pictures.
3. Start WinCC Runtime; click the custom block icon and confirm that the faceplate opens, operator permissions enforce command locks, and signal status icons display correctly.
Limitations and Operational Precautions
Operational precautions:
- Never attempt to decompile or crack protected Siemens APL blocks; doing so violates software license agreements and creates unsupported, destabilized control logic.
- Mixing legacy V7.x faceplates with modern APL faceplates produces visual inconsistency for control room operators and complicates multi-monitor window management.
- All custom SCL blocks must implement proper Organization Block calling attributes (S7_tasklist := 'true') to ensure correct OB insertion by the CFC compiler.
Engineer FAQ
Q: Can I request the APL SCL source code from Siemens Technical Support?
A: No. Siemens policy strictly classifies APL source code as proprietary intellectual property. Support will refer you to the APL Styleguide.
Q: Where can I take training on creating APL blocks?
A: Siemens SITRAIN offers the certified course 'SIMATIC PCS 7 Block Programming in Conformance with APL' (Course Code: ST-PCS7BPA).
Q: Can classic Faceplate Designer faceplates still run in PCS 7 V9.1?
A: Yes. Legacy scripts such as PCS_UpdatePermission_V6 are retained in WinCC for backward compatibility, but no new features are added.
Q: What is the primary document for APL block creation?
A: The SIMATIC PCS 7 Advanced Process Library (APL) Styleguide.
Q: Why do APL inputs use structures instead of elementary types?
A: Structures carry both the process value (Value) and the signal status byte (ST), allowing blocks to detect failed field sensors automatically.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library (APL) Styleguide
- SIMATIC S7-SCL for S7-300/400 Manual
- PCS 7 V9.0 SP3 Licenses and Configuration Limits
Related Articles
- Creating Custom APL-Style Faceplate Popups and Block Icons in SIMATIC PCS 7 WinCC
- Customizing APL Block Icon Tag Name Formats and Stripping Hierarchy Prefixes in WinCC
- Understanding the Architectural Difference Between Mode and PV_ST on PCS 7 Channel Drivers
Related Tags
APL Styleguide, SCL Programming, Block Protection, Custom Faceplates, KNOW_HOW_PROTECT