Customizing SIMATIC PCS 7 APL Block Icons - Resolving EMF Image Caching and Extended Status Display Conflicts

Customizing SIMATIC PCS 7 APL Block Icons - Resolving EMF Image Caching and Extended Status Display Conflicts

When customizing Advanced Process Library (APL) block icons—such as modifying the motor stop icon in MotL—overwriting existing Enhanced Metafile (.emf) graphic files in the WinCC GraCS directory often fails to update the runtime display because WinCC caches graphics in memory and links block icon sub-objects differently. Specifically, an APL block icon contains both a static 'SymbolCS' object and an dynamic 'Symbol1' Extended Status Display object. While 'SymbolCS' reads the file directly from disk, 'Symbol1' binds status indexes to graphic cache tables that require either renaming the custom EMF files with unique identifiers and reassigning them in the Extended Status Display configuration, or completely restarting WinCC Runtime.

Table of Contents

APL Block Icon Architecture - Symbol1 vs SymbolCS

In the SIMATIC PCS 7 Advanced Process Library (APL), block icons (such as @MotL/1, @MotSpdL/1, and @ValvL/1) are composite WinCC Customized Objects assembled from multiple primitive and ActiveX components:
1. SymbolCS Object (Static / Engineering Preview):
- Represents the static preview of the equipment in Graphics Designer when runtime is inactive.
- Points directly to an EMF image property (Picture) stored in the project GraCS directory (e.g. apl_bi_MotL_off.emf).
- Reflects file replacement immediately upon saving or re-opening the picture in Graphics Designer.
2. Symbol1 Object (Extended Status Display):
- Governs dynamic multi-state animation during WinCC Runtime.
- Evaluates automation status words (such as Status1, Status2 from the CFC block) and maps discrete bit combinations to configured State Indexes.
- Each state index points to a specific graphic file. However, the Extended Status Display maintains an internal handle table loaded at runtime startup.
3. Symbol2 and Status Indicators:
- Superimpose operational modes (Auto/Manual/Local), interlock states, and maintenance bypass indicators.

When an engineer simply replaces apl_bi_MotL_off.emf on disk without changing the file name, SymbolCS displays the new image in Graphics Designer, but Symbol1 continues rendering the cached legacy graphic in runtime.

WinCC Graphics Caching and EMF File Management

WinCC runtime engines (such as CCDrawMgr.exe and Graphics Runtime) employ an aggressive in-memory caching mechanism for vector graphics (.emf) and bitmap resources (.bmp, .png) to maximize screen switching performance across distributed operator stations:
- Cache Persistence: Once an EMF graphic is loaded into the graphics server memory, subsequent calls from an Extended Status Display retrieve the in-memory GDI/GDI+ object rather than re-reading the physical disk sector.
- The Pitfall of In-Place File Overwriting: Replacing standard library files (such as files starting with apl_bi_* or apl_fp_*) with identical names causes discrepancies between Graphics Designer and Graphics Runtime. Furthermore, subsequent PCS 7 software updates, OS compilation passes, or migration steps will overwrite customized files with the factory Siemens defaults.
- Best Practice Solution: Always create uniquely named graphic files (e.g., cust_bi_MotL_off.emf) and explicitly reassign the image references inside the Customized Object's configuration dialog.

Step-by-Step Procedure for Customizing APL Block Icon Symbols

Follow this verified engineering workflow to customize APL block icons reliably:

  1. Prepare Custom EMF Graphic Files:
    - Create vector-based EMF files using vector editing software, ensuring background transparency is preserved.
    - Save the custom files using a distinct prefix (e.g., cust_bi_MotL_off.emf, cust_bi_MotL_on.emf, cust_bi_MotL_err.emf).
    - Copy these files into the project's GraCS folder: <Project_Path>\wincproj\<OS_Name>\GraCS.

  2. Open and Modify the Template Picture:
    - In SIMATIC Manager, open the OS project and launch Graphics Designer.
    - Open your project template picture (e.g. @PCS7Typicals_V8.pdl or a custom @PCS7Typicals_Custom.pdl).
    - Locate the target block icon (e.g. @MotL/1).

  3. Disassemble the Customized Object:
    - Right-click the block icon and select Customized Object > Edit.
    - Locate and select the internal object named Symbol1 (Extended Status Display).
    - Right-click Symbol1 and select Configuration Dialog (or double-click the object).

  4. Assign Custom Images to Status Indexes:
    - Navigate to the Assign Pictures tab.
    - In the state index list, identify the states referencing the old EMF graphic (e.g. Stopped, Starting, Running).
    - Browse the file list, select cust_bi_MotL_off.emf, and assign it to the corresponding stopped states.
    - Click Apply and OK.

  5. Update SymbolCS Preview:
    - Select the SymbolCS static graphic object.
    - In the Object Properties window, under Properties > Miscellaneous > Picture, update the file path to cust_bi_MotL_off.emf.

  6. Reassemble the Customized Object:
    - Select all disassembled components of the block icon together.
    - Right-click and select Customized Object > Finish Editing.
    - Save @PCS7Typicals_Custom.pdl.

  7. Propagate Changes to Process Pictures:
    - In SIMATIC Manager, run Plant Hierarchy > Create/Update Block Icons to propagate the customized block icon across all plant screens.

Block Icon Component and Graphic Property Comparison Table

The following table contrasts the functional objects comprising an APL motor block icon:

Block Icon Sub-ObjectObject TypeFunction in Block IconImage Configuration MethodRuntime Update TriggerSymbolCSWinCC Graphic ObjectStatic engineering preview in Graphics DesignerDirect filename binding in Picture propertyImmediate upon picture save / reopenSymbol1Extended Status DisplayMulti-state motor animation (Off, Run, Starting, Tripped)Bitmask-to-Index configuration dialogRequires unique file assignment or runtime restartSymbol2Extended Status DisplayOperating mode display (Auto, Manual, Local, Out of Service)Mode bitmask mapping to index iconsDynamic evaluation of Status1 bitsSymbol3 / LockExtended Status DisplayInterlock state display (Bypass, Permission, Protection)Interlock bitmask evaluationDynamic evaluation of Status3 bitsAlarm / GroupDisplayGroup Display ObjectAlarm state indicators (Alarm, Warning, Tolerance, Fault)Linked to EventState structure tagDynamic WinCC alarm event evaluation

Verification

To confirm that custom block icon graphics are operational and free of caching artifacts:
1. Open the process picture containing the customized block icon in Graphics Designer and verify that the preview displays cust_bi_MotL_off.emf.
2. Activate WinCC Runtime. Observe the motor icon in its idle (Stopped) state.
3. Confirm that the customized white symbol renders crisply on the screen without defaulting to the legacy gray graphic.
4. Issue a start command to the motor in CFC or simulation:
- Observe the transition to Starting (blinking custom graphic).
- Observe the transition to Running (cust_bi_MotL_on.emf).
5. Open the motor faceplate (@pg_MotL.pdl) by clicking the block icon and verify that the faceplate header and status area render matching custom graphics.

Limitations and Operational Precautions

When modifying standard PCS 7 APL block icons:
1. Never Overwrite Factory Template Files: Do not modify @PCS7Elements.pdl or @PCS7Typicals.pdl directly. Always copy them to project-specific versions such as @PCS7Typicals_Custom.pdl and configure the OS Project Editor / Block Icon generator to prioritize the custom file.
2. Transparency and EMF Rendering: Ensure custom EMF graphics are saved with true transparent vector backgrounds. Raster bitmaps pasted inside an EMF wrapper can cause rectangular artifacts or black backgrounds when rendered in high-DPI WinCC screens.
3. OS Update Protection: Custom graphics named identically to Siemens factory files will be overwritten without warning during PCS 7 Service Pack installations or library upgrades. Always use a distinct customer prefix.

Engineer FAQ

Why did the block icon update in Graphics Designer but not in WinCC Runtime?

Graphics Designer reads picture files on demand, whereas WinCC Runtime caches EMF objects in memory upon startup. If the file name was not changed, the runtime engine uses its in-memory cache. Rename the file and reassign it in Symbol1, or stop and restart WinCC Runtime.

What is the difference between Symbol1 and SymbolCS in an APL block icon?

SymbolCS is a static graphic object used exclusively to render a preview in Graphics Designer when editing screens offline. Symbol1 is an Extended Status Display object that actively animates the equipment during runtime based on controller status words.

How do I prevent 'Create/Update Block Icons' from replacing my custom icons with standard icons?

Assign a unique block icon type number (e.g. type = @MotL/2 or @MotL/Custom) in the block icon properties and reference this corresponding identifier in the type parameter of the CFC block instance.

Can I use PNG files instead of EMF files for APL block icons?

While WinCC supports PNG format, PCS 7 APL block icons are built around Enhanced Metafile (.emf) vector format to support dynamic scaling, crisp edge rendering across multiple resolutions, and standardized color palette palettes.

Technical References

Related Articles

Related Tags

  • PCS7_APL
  • WinCC_Graphics
  • Block_Icons
  • Extended_Status_Display
  • EMF_Graphics
  • Graphics_Caching
  • MotL
6 respuestas