Resolving Custom Block Icon and Faceplate Call Failures in SIMATIC PCS 7 OS
In SIMATIC PCS 7 OS (V7.x, V8.x, and V9.x), failures to open custom faceplates upon clicking custom block icons occur when legacy ActiveX controls (PCS7 Control) are misconfigured or when modern APL faceplate open scripts are omitted. To resolve this, name the faceplate view file @pg_.pdl in GraCS, configure the block icon's 'type' attribute as @/, bind the 'tag' property to the CFC instance, and attach the standard SSMOpenFaceplate or @OpenFaceplate mouse-click event script.
Table of Contents
- Evolution of PCS 7 Faceplate Calling Mechanisms (Classic vs. APL)
- Block Icon and Faceplate Structural Binding Matrix
- Configuring Standard APL Faceplate Architecture (@pg_*.pdl)
- Remediating Legacy ActiveX 'PCS7 Control' Call Scripts
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Evolution of PCS 7 Faceplate Calling Mechanisms (Classic vs. APL)
In SIMATIC PCS 7 Operator Stations, clicking a block icon opens a multi-tabbed faceplate window displaying process values, setpoints, alarm states, and operator command buttons. Across different PCS 7 software generations, the underlying calling mechanism underwent significant architectural changes:
1. Classic Architecture (PCS 7 V6.x and Legacy Custom Guidelines): Faceplates relied on proprietary ActiveX (OCX) controls. The block icon contained internal properties such as server name set to PCS7 <Name> Control and executed custom OLE calls. If these ActiveX components are not registered via Windows COM or are blocked by modern 64-bit operating systems, clicking the icon produces zero response.
2. Modern Architecture (PCS 7 V7.x through V9.x / APL): The faceplate framework operates natively through standard WinCC picture windows (@Faceplate.pdl) using C-scripts (SSMOpenFaceplate or @OpenFaceplate) from the Basic Process Control (BPC) library. Faceplates are built using standardized picture files:
* @pg_<BlockType>.pdl: Standard view (e.g., @pg_CustomValve.pdl).
* @pm_<BlockType>.pdl: Maintenance view.
* @pl_<BlockType>.pdl: Limit view.
* @pa_<BlockType>.pdl: Alarm view.
When an engineer constructs a block icon using vintage V6.x documentation on PCS 7 V8.1, the calling scripts fail because modern WinCC runtime expects the standardized @OpenFaceplate function and @pg_ naming conventions.
Block Icon and Faceplate Structural Binding Matrix
To ensure seamless faceplate instantiation, adhere to the standardized PCS 7 parameter bindings:
MonAnLtype@<BlockType>/<IconVariant>@CustomValve/1tagPlant/Area_1/VLV_101tagStructureCustomValveserver name (Legacy)PCS7 CustomValve Control (Legacy only)Mouse ClickSSMOpenFaceplate(lpszPictureName, lpszObjectName)@Faceplate.pdl with tag prefix@pg_<BlockType>.pdl@pg_CustomValve.pdl in GraCSEngineering notice: Custom faceplate PDL files must be placed directly in the OS project's GraCS folder.
Configuring Standard APL Faceplate Architecture (@pg_*.pdl)
To upgrade a custom faceplate to the robust modern PCS 7 architecture:
- Format Picture Names in GraCS:
* Save the main faceplate graphic in the OS project'sGraCSdirectory with the prefix:
@pg_<BlockTypeName>.pdl(e.g.,@pg_CustomValve.pdl).
* If implementing maintenance and alarm tabs, create@pm_CustomValve.pdland@pa_CustomValve.pdl. - Configure Block Icon Object Properties:
* Open the process screen or@PCS7Typicals.pdlin Graphics Designer.
* Select the custom block icon.
* Under Properties > General:- Set type to
@CustomValve/1. - Set tagStructure to
CustomValve.
- Set type to
- Attach Standard Faceplate Calling Script to Mouse Click:
* In the block icon's properties, switch to the Events tab.
* Select Mouse > Mouse Click.
* Right-click and choose C-Action.
* Insert the standard PCS 7 faceplate open call:
c #include "apdefap.h" void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { SSMOpenFaceplate(lpszPictureName, lpszObjectName); }
* Alternatively, use the Dynamic Wizard > Picture Functions > Open Faceplate to automatically bind the script.
Remediating Legacy ActiveX 'PCS7 Control' Call Scripts
If the project mandates retaining legacy ActiveX controls from PCS 7 V6.x:
1. Register ActiveX OCX Files in Windows:
* Open Command Prompt as Administrator.
* Navigate to the folder containing the custom OCX file:
cmd
cd /d "C:\Program Files (x86)\Siemens\WinCC\bin"
regsvr32.exe CustomValveControl.ocx
* Ensure Windows confirms successful registration.
2. Verify WinCC ActiveX Selection:
* In Graphics Designer, open Tools > OCX Selection.
* Verify that PCS7 CustomValve Control is checked in the list.
3. Verify Script Execution Queues:
* Open APDiag.exe on the OS station.
* Verify whether clicking the icon generates a Null pointer or Failed to load control error in the diagnostic output window.
Verification
Verify faceplate execution in WinCC Runtime:
1. Activate WinCC Runtime on the OS station.
2. Navigate to the process screen containing the custom block icon.
3. Left-click the block icon.
4. The faceplate window must immediately pop up, centered or pinned, displaying @pg_CustomValve.pdl populated with live process values corresponding to the icon's tag prefix.
5. Confirm that command buttons, interlock displays, and setpoint inputs operate without C-script errors.
Limitations and Operational Precautions
- Never name custom faceplates with reserved Siemens APL block names (e.g.,
@pg_MotL.pdl,@pg_VlvL.pdl), as this overwrites standard library faceplates and causes system-wide rendering errors. - Running OS-Project Editor will not overwrite user faceplates as long as they follow custom naming (
@pg_Custom...); however, backing up theGraCSdirectory prior to major version upgrades is mandatory. - Ensure all internal variables in custom faceplates utilize tag prefix notation (e.g.,
.PV_Out,.SP,.Reset) rather than hardcoded plant tags.
Engineer FAQ
Why did clicking the icon do nothing when server name was configured?
In PCS 7 V7 and V8, WinCC ignores the legacy 'server name' property unless custom legacy C-actions are present. The modern framework relies on the 'type' attribute and SSMOpenFaceplate to load '@pg_.pdl'.
What is the difference between @pg_ and @pl_ faceplate files?
'@pg_' is the Process Graphic (standard view), '@pl_' is the Limit view, '@pm_' is the Maintenance view, and '@pa_' is the Alarm view. Standard faceplate headers switch views dynamically by swapping these files into the picture window.
Can I create faceplates using Visual Basic Script (VBS) instead of C?
Yes, but standard PCS 7 Basic Process Control functions (such as SSMOpenFaceplate, Loop in Alarm, and Horn management) are written in C. Using standard C-scripts ensures seamless integration.
Technical References
- SIMATIC PCS 7 Programming Instructions for Blocks (A5E32106070)
- SIMATIC HMI WinCC V7.3 Scripting: C and VBS Manual (A5E34775440)
- Siemens Support Entry 16514590: How to Create and Link Custom Faceplates in PCS 7
Related Articles
- Designing Custom APL Block Icons and Faceplates in SIMATIC PCS 7
- Reusing and Duplicating Block Icons Across Multiple WinCC Pictures in SIMATIC PCS 7
- Troubleshooting WinCC C-Script Runtime Errors with APDiag
Related Tags
- Faceplate
- Block Icon
- SSMOpenFaceplate
- WinCC GraCS
- Tag Prefix
- APL Faceplate
- PCS 7 OS