Resolving Disabled OK Execution Buttons on Custom and BRAUMAT Valve Faceplates in SIMATIC PCS 7

Resolving Disabled OK Execution Buttons on Custom and BRAUMAT Valve Faceplates in SIMATIC PCS 7

In SIMATIC PCS 7, when an operator selects a command (such as 'Open' or 'Close') on a custom or BRAUMAT valve faceplate (e.g., VlvDS) but the 'OK' execution button remains disabled or fails to respond, the issue is caused by a missing WinCC C-script function. BRAUMAT faceplates call proprietary functions like BL_VlvDSOperationAreaOnOK(), which reside in specialized script libraries (aplib). If the block was copied into a standard PCS 7 project without installing the corresponding library, WinCC encounters an unhandled script exception and aborts. Resolving this requires copying the missing BL_*.fct scripts into the project or replacing the call with standard APL APL_OnOK().

Table of Contents

The APL 2-Step Command Execution Architecture (Select -> OK)

In SIMATIC PCS 7 (v7.x, v8.x, v9.x), valve and motor faceplates implement a standardized 2-Step Operational Safety Philosophy:
* Step 1 (Command Selection):
The operator clicks an action button (e.g., Open or Close). The button updates visual radio highlights and stores an integer option code in an internal screen property (OKOption on object cmnObj).
* Step 2 (Execution Confirmation):
The operator clicks the OK button. The button executes a C-function that evaluates user authorization, writes the command bit to the controller, and closes the confirmation dialog.
* The Failure Symptom:
The operator selects Open, but clicking OK produces no audible click, no tag write, and no faceplate state change. The valve remains idle.

Root Cause of Dead Execution Buttons: Missing BL_ C-Scripts

When an engineer imports a double-seat valve (VlvDS) from a BRAUMAT or classic demo project into standard PCS 7:
* The Code Discrepancy:
* Standard APL button click event:
c #include "apdefap.h" void OnClick(...) { APL_OnOK(lpszPictureName, lpszObjectName, lpszPropertyName, (int)GetPropDouble(lpszPictureName, "cmnObj", "OKOption")); }
* BRAUMAT / Custom button click event:
c #include "apdefap.h" void OnClick(...) { BL_VlvDSOperationAreaOnOK(lpszPictureName, lpszObjectName, lpszPropertyName, (int)GetPropDouble(lpszPictureName, "cmnObj", "OKOption")); }
* The Silent Failure:
If the custom function BL_VlvDSOperationAreaOnOK.fct is missing from C:\Program Files (x86)\Siemens\WinCC\aplib or the local project's Library directory, the WinCC C-script interpreter aborts silently upon mouse click.

Comparison Table: APL Standard Scripts vs BRAUMAT Script Dependencies

The table below outlines functional script counterparts:

Operation RequirementStandard APL ScriptBRAUMAT / Industry Library ScriptMissing Script ImpactCommand ExecutionAPL_OnOK()BL_VlvDSOperationAreaOnOK() / IL_VlvDsLOperationAreaOnOK()OK Button completely deadAudit LoggingEmbedded in APLIL_VlvDsLOperationLog()Operator messages not loggedPermission CheckAPL_CheckPermission()IL_UpdatePermission()Buttons disabled / grayed outMulti-Element StatusAPL_UpdateElement()IL_UpdateElementOperation8()Feedback animations freeze

Diagnosing WinCC Script Exceptions Using APDIAG

To prove that a missing script is blocking the button:
1. On the OS Server or Client station, open Windows Explorer and navigate to:
C:\Program Files (x86)\Siemens\WinCC\uTools
2. Launch apdiag.exe.
3. In apdiag, select Output Window.
4. Return to WinCC Runtime and click the unresponsive OK button on the faceplate.
5. apdiag immediately prints:
error: undefined function 'BL_VlvDSOperationAreaOnOK' in action @pg_VlvDS_Standard.pdl.

Step-by-Step Procedure to Restore OK Button Functionality

  1. Method A: Substituting Standard APL_OnOK (Quickest Fix):
    * Open the faceplate PDL (e.g., @pg_VlvDS_Standard.pdl) in WinCC Graphic Designer.
    * Locate and select the OK button in the execution pane.
    * Open Object Properties -> Events -> Mouse -> Mouse Click.
    * Replace BL_VlvDSOperationAreaOnOK(...) with APL_OnOK(...).
    * Compile the C-action and save the PDL.
  2. Method B: Copying Missing Script Files (Clean Integration):
    * Locate the original source project (e.g., BRAUMAT demo).
    * Search for BL_*.fct files in C:\Program Files (x86)\Siemens\WinCC\aplib or the project's Library folder.
    * Copy BL_VlvDSOperationAreaOnOK.fct into your OS project's Library directory.
    * In WinCC Explorer, right-click Global Script -> C-Editor -> Options -> Regenerate Header.
  3. Deploy Official Industry Library (Best Practice):
    Migrate to the official SIMATIC PCS 7 Industry Library VlvDsL (6ES7658-1EX08-1YB5), which installs all certified C-scripts and faceplates automatically.

Verification

To verify that the OK execution button is operational:
1. Open the valve faceplate in WinCC OS Runtime.
2. Select the Open command button. Confirm the command radio indicator highlights.
3. Click the OK button.
4. Verify that the valve command transmits immediately to the controller and the valve graphic animates toward the open state.
5. Confirm that apdiag.exe logs zero script execution errors.

Limitations and Operational Precautions

  • Operator Authorization Pre-Requisites: Even with the script restored, the OK button remains disabled if the active logged-in user lacks User Administrator Level 5 ("Process controlling") or lacks area permissions for the valve's plant unit.
  • OS Project Editor Template Overwrite: Modifying standard faceplates directly puts them at risk of being overwritten if the OS Project Editor runs with template updates enabled. Maintain backups of edited faceplates.
  • Licensing Disclaimer: Utilizing the PCS 7 Industry Library (6ES7658-1EX08-1YB5) requires valid engineering and runtime licenses validated against the applicable Siemens catalog and authorized distributor quotation.

Engineer FAQ

Technical References

Related Articles

Related Tags

  • Faceplate OK Button
  • APL_OnOK
  • BL_VlvDSOperationAreaOnOK
  • BRAUMAT VlvDS
  • apdiag.exe
  • WinCC C-Script
8 respuestas