Understanding Extended Status Display Mechanics and VBScript Status Word Binding in APL Block Icons
In SIMATIC PCS 7 Advanced Process Library (APL) block icons (such as @VlvMotL for motorized valves), the connection between the controller status words (Status1, Status2, Status3, Status4) and the displayed graphic states (Symbol1, Symbol2) is not made through direct tag links, but is orchestrated via internal VBScripts embedded in the block icon's Events subsystem. Within the block icon in WinCC Graphics Designer, the Extended Status Display object features a VBS action on the 'Status1 > Change' event (or internal script 'CollectStatus'). This script reads the 32-bit DWORD status words, evaluates bitmasks corresponding to valve states (such as Opened, Closed, Motor Running, or Interlocked), and programmatically assigns calculated integer state indices to the 'Symbol1' and 'Symbol2' properties, which then render the corresponding SVG or bitmap frames.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
The visual sophistication of PCS 7 Advanced Process Library block icons—rendering multi-layered, animated pump impellers, motorized valve bodies, and flashing alarms—relies on the WinCC Extended Status Display (ExtendedStatusDisplay). When engineers inspect block icon properties in WinCC Graphics Designer attempting to locate the direct tag connections for Symbol1 (valve body) and Symbol2 (motor actuator), they frequently find static properties without dynamic tag bindings. The operational intelligence is encapsulated inside local Visual Basic Scripts (VBS) triggered whenever the AS controller updates status DWORDs (Status1 through Status4). Understanding this event-driven script architecture enables engineers to troubleshoot animation glitches, customize graphic representations, and maintain APL visualization integrity.
Architecture and Fundamental Mechanics
The APL visualization engine separates process data delivery from graphical rendering through an intermediate script decoding layer:
- Status Words in the AS Block (
VlvMotL):
* The AS function blockVlvMotLpacks operational states, limit switch feedback, interlock conditions, and mode statuses into 32-bit DWORD variables (Status1,Status2,Status3,Status4).
* For instance, inStatus1: Bit 0 = Open limit, Bit 1 = Closed limit, Bit 2 = Opening, Bit 3 = Closing, Bit 14 = Motor running, Bit 19 = Interlock active.
* These DWORDs are read cyclically by the WinCC OS Server via AS/OS tag connection. - The Extended Status Display Object:
* Standard WinCC Status Displays evaluate a single tag and map integer values (0, 1, 2...) to static bitmaps.
* The Extended Status Display supports multi-layer composite rendering: it divides the graphic into independent graphical components, such asSymbol1(the primary valve body) andSymbol2(the actuator or drive motor).
* Each symbol has an associated image catalog containing indexed graphic states (e.g., Index 0 = Gray/Closed, Index 1 = Green/Open, Index 2 = Yellow/Transition, Index 3 = Red/Fault). - The VBScript Bridge (
CollectStatus/Status1_OnChange):
* On the block icon object (@VlvMotL/1), theStatus1property is dynamically linked to the tag<Tag>.Status1.
* Attached to theStatus1property is a VBScript event handler (Status1_OnChange). When the tag value changes, the script executes:- It reads the current values of
Status1,Status2, andEventState. - It applies bitwise
ANDmasks to extract individual status flags (e.g.,IsOpen = Status1 AND &H00000001). - It evaluates the logical hierarchy: If Interlock Tripped -> Set Symbol1 = Fault; Else If Running -> Set Symbol2 = Active; Else -> Set Idle.
- It writes the resulting integer indices directly to
Item.Symbol1 = iSymbol1andItem.Symbol2 = iSymbol2. - The Extended Status Display receives these integer updates and renders the corresponding vector frames instantly.
- It reads the current values of
Step-by-Step Implementation Procedure
Follow these steps to inspect, debug, and understand the VBScript status word binding in APL block icons:
- Open the Block Icon in WinCC Graphics Designer:
* In WinCC Explorer, open the template picture containing the APL block icons (e.g.,@PCS7Typicals_APL_V9.pdlor@Template_APL_V9.pdl) or open an existing process graphic (.pdl).
* Locate the motorized valve block icon (e.g.,@VlvMotL/1or@VlvMotL/2). - Inspect Object Properties and Events:
* Right-click the block icon and select Properties.
* In the Object Properties window, select the root object (the customized object or group).
* Navigate to the Properties tab. Notice properties such asStatus1,Status2,Tag, andTagHigh.
* Switch to the Event tab.
* Navigate toProperty Topics > Internal > Status1or select theExtendedStatusDisplayobject within the customized group. -
Examine the Event Script:
* Double-click the lightning bolt icon next to the Change event ofStatus1.
* The VBS Action Editor opens, displaying the internal decoding script:
```vbscript
Dim objStatusDisplay, dwStatus1, dwStatus2
Set objStatusDisplay = ScreenItems("ExtendedStatusDisplay")
dwStatus1 = Item.Status1
dwStatus2 = Item.Status2' Bitmask evaluation
If (dwStatus1 And &H00000001) Then
objStatusDisplay.Symbol1 = 1 ' Open state
ElseIf (dwStatus1 And &H00000002) Then
objStatusDisplay.Symbol1 = 0 ' Closed state
End If
`` 4. **Inspect the Extended Status Display Configuration**: * In the Graphics Designer, double-click theExtendedStatusDisplayobject directly. * The Extended Status Display configuration wizard opens. * Review the image assignment table: inspect which bitmaps or SVG symbols are mapped to state indices0, 1, 2, 3...for bothSymbol1andSymbol2. 5. **Testing Status Word Changes in Runtime**: * Activate WinCC Runtime. * Using CFC test mode or WinCC Tag Simulation, toggle bits inVlvMotL.Status1. * Observe that the VBScript triggers immediately upon the tag value change, updatingSymbol1andSymbol2` on the operator display.
Verification
In WinCC Graphics Designer, place an instance of @VlvMotL/1 on a test picture and connect it to a running VlvMotL block. Put the AS into RUN. When the valve is commanded open in CFC, verify that Status1 transitions to include Bit 0, the VBScript fires, Symbol1 updates to index 1, and the valve body turns solid green. Issue a close command; confirm that Status1 reflects Bit 1 and Symbol1 updates to index 0 (gray/closed).
Limitations and Operational Precautions
Do not modify the standard APL block icons in @PCS7Typicals_APL_V9.pdl directly. If custom animations or modified scripts are required, copy the typicals to a customer template picture (e.g., @PCS7Typicals_Custom.pdl) and assign custom type numbers. Running complex, non-optimized scripts on hundreds of block icons can degrade client CPU performance.
Engineer FAQ
Why didn't Siemens use direct tag connections for Symbol1 and Symbol2?
A motorized valve has numerous composite states (opened, closed, motor running forward, motor running reverse, torque fault, interlock trip). Encoding this logic into a single tag connection is impossible; VBScript evaluates multiple status DWORDs dynamically.
What is the difference between Symbol1 and Symbol2 on VlvMotL?
Symbol1 represents the mechanical valve body (showing open/closed piping state), while Symbol2 represents the actuator or electrical drive motor mounted on top.
Can I add a Symbol3 to the Extended Status Display?
Depending on the WinCC version and object template, Extended Status Displays support up to 4 independent symbol layers with separate state indices.
Does the VBScript execute on the OS Server or OS Client?
The script executes locally on the OS Client (or Web client) inside the Graphics Runtime (pdlrt.exe) process whenever the subscribed tag updates.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library (V9.0 SP3) Manual (A5E41356138-AC)
- SIMATIC HMI WinCC V7.5 Graphics Designer Manual
- Siemens Industry Online Support Entry 109780813 - PCS 7 Licensing and Engineering Guidelines
Related Articles
- Resolving MotSpdCL Process Control Errors and EventState Misalignment with Third-Party VFDs in PCS 7
- Resolving Faceplate and SFC Visualization Scaling Defects on High-Resolution (4K) Displays in PCS 7
- Troubleshooting Inactive APL Faceplate Buttons and Communication Failures in S7-PLCSIM for PCS 7
Related Tags
- VlvMotL
- Extended Status Display
- APL Block Icon
- Symbol1
- Symbol2
- VBScript