Creating Custom Motor Block Icons and Diagnosing Unclickable Faceplate Links in SIMATIC PCS 7

Creating Custom Motor Block Icons and Diagnosing Unclickable Faceplate Links in SIMATIC PCS 7

In SIMATIC PCS 7 WinCC supervisory graphics, custom motor block icons appearing unclickable or disabled in runtime typically suffer from missing User Object system attributes (such as 'type' or 'Servername') or invalid script parameters within the mouse click event. Furthermore, displaying multiple operational motor states (stopped, running, flashing, maintenance) without a 32-bit DWORD Status word is accomplished by utilizing the WinCC Extended Status Display object, which accepts up to four individual boolean status tags to generate up to 16 distinct bitmap visualization states.

Table of Contents

Anatomy of Unclickable APL Block Icons and Script Failure Modes

In the SIMATIC PCS 7 Advanced Process Library (APL), clicking a block icon triggers a standardized C-script event (APL_OpenFaceplate) that dynamically instantiates the corresponding faceplate popup. When a custom block icon appears unresponsive or disabled in runtime:
- Missing or Malformed type Property: The User Object must have a string property named type formatted as @<BlockType>/<Variant> (e.g. @DriveMot1D/1). If type is missing or misspelled, the faceplate engine cannot determine which .pdl view files to load.
- Unassigned Servername or TagPrefix: If the Servername property is blank or the TagPrefix does not match an active WinCC structure tag, internal validation scripts abort execution silently.
- Missing Faceplate Template Files: The runtime framework expects files named @PG_<BlockType>_Standard.pdl and @PG_<BlockType>_Overview.pdl to exist in the OS GraCS folder.

Debugging Block Icon Click Events Using apdiag.exe

To pinpoint why a block icon is unclickable, engineers should utilize the built-in Siemens diagnostic tool apdiag:

  1. Launch apdiag.exe: In Windows Explorer on the OS station, navigate to:
    C:\Program Files (x86)\SIEMENS\WINCC\uTools\apdiag.exe
  2. Open Diagnostic Output Window: In apdiag, select Output Window > Open.
  3. Trigger the Fault: Click the unresponsive motor block icon in WinCC Runtime.
  4. Interpret Error Output: The output window prints runtime C-script errors in real time:
    - Error: Picture @PG_DriveMot1D_Standard.pdl not found -> Missing faceplate picture.
    - Error: Tag not found -> Mismatched TagPrefix or missing structure tag.
    - Error: Function APL_OpenFaceplate parameter invalid -> Malformed User Object properties.

Configuring Extended Status Display Using Discrete Boolean Tags

While standard APL motor blocks pack status bits into a single 32-bit DWORD (Status1), custom blocks often output raw booleans (e.g. Run, Fault, Auto, Local). To animate multi-color bitmap states without refactoring SCL code:

  1. Insert Extended Status Display: In WinCC Graphics Designer, place an Extended Status Display object inside the block icon User Object.
  2. Assign Boolean Status Tags:
    - Under object properties, navigate to Miscellaneous.
    - Assign individual boolean tags to properties Status1, Status2, Status3, and Status4 (e.g., Status1 = .AutoAct, Status2 = .RunAct, Status3 = .FaultAct).
  3. Configure State Bitmaps:
    - Double-click the Extended Status Display to open the configuration wizard.
    - Define bitmap assignments (.bmp or .png) for each binary combination:
    • State 000: Stopped / Manual (Gray motor bitmap)
    • State 001: Stopped / Auto (Green outline bitmap)
    • State 011: Running / Auto (Solid green running bitmap)
    • State 100: Fault Active (Flashing red alarm bitmap)

Boolean State Permutation Matrix for Extended Status Display

The following table details binary permutation mapping using four discrete boolean status inputs:

State IndexStatus4 (Fault)Status3 (Local)Status2 (Run)Status1 (Auto)Visual Display RepresentationGraphic File00000Motor Stopped (Manual Mode)Mot_Stop_Man.bmp10001Motor Stopped (Auto Ready)Mot_Stop_Auto.bmp30011Motor Running (Auto Mode)Mot_Run_Auto.bmp20010Motor Running (Manual Mode)Mot_Run_Man.bmp40100Motor in Local Field ControlMot_Local.bmp81XXXMotor Trip / Electrical FaultMot_Fault_Flash.bmp

Note: The Extended Status Display supports flashing animations natively without requiring cyclic background C-scripts.

Verification

Verify block icon clickability and dynamic graphics:
1. Open WinCC Runtime and observe the custom motor block icon.
2. Toggle motor operating modes in the PLC; verify that the motor icon transitions smoothly between stopped, running, and fault bitmaps.
3. Click the block icon; confirm that the mouse pointer shows active link cursor and opens the faceplate popup cleanly.
4. Verify in apdiag.exe output window that zero script errors or missing file exceptions are logged during faceplate opening.

Limitations and Operational Precautions

Essential rules for custom block icon design:
- Using individual boolean tags across hundreds of block icons increases WinCC Tag Management licensing tag counts and communication load compared to packed DWORD status words.
- Bitmaps utilized in block icons should be pre-scaled to exact pixel dimensions (e.g. 32x32 or 48x48 pixels) to prevent graphical anti-aliasing blur.
- Never modify standard @PCS7TypicalsAPLV8.pdl directly; create a custom project typical file (e.g. @PCS7TypicalsCustom.pdl) to prevent overwrites during library updates.

Engineer FAQ

Where can I find apdiag.exe in WinCC?

The apdiag.exe executable is located in the WinCC installation directory under C:\Program Files (x86)\SIEMENS\WINCC\uTools\apdiag.exe.

Why is packing status into a DWORD better than using four booleans?

A single DWORD tag transfers 32 status bits in a single communication telegram, whereas four booleans require four separate tag requests, consuming four times the communication overhead.

How do I make the motor icon flash during fault conditions?

In the Extended Status Display wizard, check the 'Flashing' property checkbox for the specific state index corresponding to the fault bit combination.

Technical References

Related Articles

Related Tags

  • Block Icons
  • Extended Status Display
  • apdiag
  • Faceplates
  • WinCC Graphics
6 respuestas