How to Open APL Technological Faceplates from Standard WinCC Screen Buttons Using APL Scripts
In SIMATIC PCS 7 V8.0 and V8.1, opening the faceplate of a technological block (such as OpTrig, MotL, or PIDConL) from a standard WinCC screen button or static rectangle rather than a generated block icon is accomplished using the APL faceplate open script functions. Standard APL faceplates are invoked via the C-script function 'APL_OpenFaceplate' or 'SSMOpenTopFieldFix'. To configure a standard Windows button to launch a specific faceplate, assign the technological block's tag prefix (e.g., 'Plant/Area/OpTrig_Instance') and faceplate type identifier to the button's mouse-click event using the WinCC Dynamic Wizard or direct APL API calls.
Table of Contents
- APL Faceplate Invocation Architecture: Block Icons vs Screen Objects
- Understanding the APL_OpenFaceplate C-Script Function and Parameters
- Configuring Standard Screen Buttons via the Dynamic Wizard
- Handling Tag Prefixes and Coordinate Window Positioning
- Comparison of Faceplate Triggering Techniques in WinCC
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
APL Faceplate Invocation Architecture: Block Icons vs Screen Objects
In standard SIMATIC PCS 7 operation, faceplates are opened by clicking an auto-generated block icon:
* The Block Icon Mechanism:
* The block icon contains internal system properties: type (e.g., @OpTrig/1), tag (the WinCC tag prefix), and ServerName.
* Clicking the icon triggers internal APL C-scripts (APL_OpenFaceplate), passing these attributes to the Picture Window manager.
* The Custom Interface Requirement:
* Engineers frequently design custom equipment graphics, high-density dashboard overviews, or simple operational buttons (e.g., Trigger Batch Flush) where displaying a full APL block icon is visually clunky.
* Opening the standard faceplate from a plain WinCC button or graphical shape requires passing the identical parameter payload directly to the APL faceplate engine.
Understanding the APL_OpenFaceplate C-Script Function and Parameters
The core APL C-function governing faceplate generation is declared in apdefap.h:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
// Define the full tag path of the technological block
char* pszTagPrefix = "Plant1/Area2/OpTrig_BatchStart";
// Define the faceplate type identifier (matches block type)
char* pszFaceplateType = "@OpTrig";
// Call the standard APL faceplate opener
// Parameters: Parent Picture, Calling Object, Tag Prefix, Faceplate Type
APL_OpenFaceplate(lpszPictureName, lpszObjectName, pszTagPrefix, pszFaceplateType);
}
- Required Parameters:
pszTagPrefix: The exact WinCC structure tag name corresponding to the CFC block instance.pszFaceplateType: The faceplate template family (e.g.,@OpTrig,@MotL,@PIDConL,@VlvL).
Configuring Standard Screen Buttons via the Dynamic Wizard
To avoid manual C-scripting, use the integrated WinCC Dynamic Wizard:
- Draw Screen Button:
* In Graphics Designer, place a standard Windows Button on the canvas.
* Label the button:Open Trigger Control. - Launch Dynamic Wizard:
* Open the Dynamic Wizard pane: select the Picture Functions tab.
* Double-clickPicture selection via measurement point / block icon(orOpen faceplate). - Select Technological Block:
* In the wizard dialog, browse the plant hierarchy.
* Select the target block instance (e.g.,OpTrig).
* The wizard generates the complete, error-free C-action on the button'sMouse Clickevent.
Handling Tag Prefixes and Coordinate Window Positioning
When invoking faceplates from custom screen objects:
- Tag Prefix Binding: Standard APL faceplates (
@PG_OpTrig_Standard.pdl) contain generic internal tags (e.g.,.Out,.In). TheTagPrefixproperty on the host Picture Window binds these generic fields to the physical instance tag. - Window Positioning (
SSMOpenTopFieldFix): - By default, APL calculates faceplate coordinates to appear adjacent to the calling mouse cursor without overlapping screen boundaries or obscuring alarm banners.
- Calling
APL_OpenFaceplateensures automatic multi-monitor desktop boundary detection.
Comparison of Faceplate Triggering Techniques in WinCC
The table below compares methods for launching APL faceplates in SIMATIC PCS 7.
Verification
To confirm that the custom screen button opens the faceplate properly:
1. In Graphics Designer, save the modified process picture.
2. Activate WinCC Runtime.
3. Click the custom button: verify that the OpTrig faceplate opens immediately in front of the picture.
4. Verify that the faceplate header displays the correct tag name and plant hierarchy path.
5. Click the operator trigger command in the faceplate: confirm that the controller processes the pulse and updates feedback dynamically.
6. Verify that closing the faceplate cleanly releases the window handle without client memory leaks.
Limitations and Operational Precautions
- Standard screen buttons lack integrated group displays; if alarm awareness is required for the technological block, use standard block icons or embed a group display object.
- Always ensure that the user logged into WinCC possesses adequate authorization levels (Level 5 or Level 6) to operate the faceplate controls once opened.
- Do not attempt to bypass
APL_OpenFaceplateby directly manipulating Picture Window visibility flags, as this bypasses client multi-screen coordinate positioning. - Always validate final software licensing and system documentation against the applicable Siemens catalog and authorized distributor quotation.
Engineer FAQ
Can I open a MotL faceplate from a simple graphic rectangle?
Yes. Attach the APL_OpenFaceplate script to the rectangle's Mouse Click event with pszFaceplateType = '@MotL' and the motor's tag prefix.
Why did the faceplate open with blank fields and '#' symbols?
The pszTagPrefix passed to the script does not match the exact WinCC tag name generated during OS compilation; verify the tag name in WinCC Tag Management.
Where is the APL_OpenFaceplate function defined?
It is defined in the standard PCS 7 C-script library header apdefap.h installed in the WinCC directory.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library System Manual
- Siemens Industry Online Support FAQ: Opening APL Faceplates with Custom Buttons
- SIMATIC PCS 7 Programming Instructions for Blocks Manual
Related Articles
- How to Customize APL VlvMotL Block Icons and Faceplates for Auxiliary Motor and Actuator Diagnostics
- Why PCS 7 APL Uses Packed Status Words Instead of Individual Boolean Outputs - Performance, Licensing, and OS Tag Efficiency
- How to Configure User Rights, Password Verification, and Operator Authorization for PCS 7 Faceplates
Related Tags
- APL Faceplates
- APL_OpenFaceplate
- WinCC Buttons
- OpTrig
- TagPrefix