How to Fix Small, Unresizable SFC Overview Windows in WinCC Runtime

How to Fix Small, Unresizable SFC Overview Windows in WinCC Runtime

To resolve the issue where the SIMATIC PCS 7 SFC Visualization window renders as a tiny, unreadable, and unresizable frame in WinCC Runtime, engineers must correct the window coordinate parameters passed to SFCOpenOverview and verify the template picture window properties. In PCS 7 C-scripts, the function SFCOpenOverview(szFullDmVarName, left, top, width, height, (void*)0) relies on SSMGetWorkFieldCoordinates to determine screen bounds. If this call returns zero coordinates, or if the underlying template picture (@SFC_VIEW.pdl or @SFC_OVERVIEW.pdl) has its Picture Window properties configured with Sizable = FALSE or fixed geometry, the window cannot be expanded. Updating the C-action script or restoring default @SFC_*.pdl template files resolves the issue.

Table of Contents

Architecture of PCS 7 SFC Visualization C-APIs

SIMATIC PCS 7 SFC Visualization provides standard graphic controls and C-scripts allowing operators to view, control, and troubleshoot sequential function charts directly from WinCC Runtime.

The interface is managed via dynamic link libraries:
* sfccli.dll: The SFC Client execution engine.
* sfccli.h: The C-header file defining exported functions.
* Template Pictures (@SFC_*.pdl): Predefined screen layouts (@SFC_OVERVIEW.pdl, @SFC_VIEW.pdl, @SFC_PICTURE.pdl) installed into the project's GraCS directory by the OS Project Editor.

When an operator clicks an SFC block icon or navigation button, an internal C-action invokes sfccli.dll to instantiate the SFC viewer control within a designated screen workfield.

Root Causes: Coordinate Calculation Failures and Fixed Geometries

When the SFC window appears as a minuscule, unreadable rectangle that refuses manual resizing, the failure stems from one of two flaws:

1. Zero Coordinate Extraction in C-Scripts

In standard PCS 7 Split Screen Manager (SSM) scripts:

SSMGetWorkFieldCoordinates(SSMGetScreen(lpszPictureName), &left, &top, &width, &height);
SFCOpenOverview(szFullDmVarName, left, top, width, height, (void*)0);

If SSMGetWorkFieldCoordinates fails to determine the active monitor context (e.g., in multi-monitor setups or custom screen hierarchies), variables width and height evaluate to zero or minimum default bounds (e.g., 100x100 pixels).

2. Picture Window Property Locks in GraCS

If the underlying template picture window in @SFC_*.pdl was modified:
* Property Sizable is set to FALSE (disabling edge-dragging resize handles).
* Property Adaptive or Fit to Screen is misconfigured.
* The window border style is set to None or fixed dialog.

SFCOpenOverview vs SFCOpenSection Function Mechanics

Engineers frequently confuse the two primary SFC visualization functions:

1. SFCOpenOverview

  • Opens the high-level chart view displaying all parallel branches, steps, and transitions in an zoomed-out topology.
  • Designed to fit the entire operational workfield area of the monitor.

2. SFCOpenSection

  • Opens a zoomed-in, detailed section of the sequencer focusing on the currently active step and immediate preceding/succeeding transitions.
  • Displays operator input fields, interlock statuses, and step timer countdowns.

If a script erroneously passes zero coordinates to SFCOpenOverview, the control renders at its minimum clipping threshold instead of expanding across the workfield.

Step-by-Step Resolution: Script Adjustment and Template Verification

Follow this engineering sequence to restore normal resizable SFC windows:

Step 1: Correct the Button C-Action Script

  1. Open the process picture in WinCC Graphics Designer.
  2. Select the button calling the SFC window and open its C-action.
  3. Ensure the script explicitly validates workfield dimensions:
    ```c
    #include "apdefap.h"
    #pragma code ("sfccli.dll")
    #include "sfccli.h"
    #pragma code ()

long left, top, width, height;
TCHAR szFullDmVarName[MAX_DM_VAR_NAME + 1 + 32];

// Extract tag prefix and build variable name
GetServerTagPrefix(&pServerPrefix, &pTagPrefix, &pWindowPrefix);
// ... [variable name assembly] ...

// Fetch workfield coordinates
SSMGetWorkFieldCoordinates(SSMGetScreen(lpszPictureName), &left, &top, &width, &height);

// Fallback safeguard if coordinates return invalid
if (width < 640 || height < 480) {
left = 50;
top = 50;
width = 1200;
height = 800;
}

// Open overview window
SFCOpenOverview(szFullDmVarName, left, top, width, height, (void*)0);
```

Step 2: Restore Base SFC Template Pictures

  1. In Windows Explorer, check <Project_Dir>\GraCS\@SFC_*.pdl.
  2. If template pictures were inadvertently overwritten, re-run the OS Project Editor in WinCC Explorer.
  3. On the Basic Data tab, ensure standard SFC template files are selected for update.
  4. Click OK to restore factory @SFC_*.pdl files with resizable borders enabled.

SFC Visualization Call Functions and Window Parameter Matrix

The following table outlines the SFC visualization functions, parameters, and expected window behaviors:

Function NameLibraryTarget DisplayCoordinate DependencyResize SupportSFCOpenOverviewsfccli.dllComplete sequencer chart topologyWorkfield (left, top, w, h)Yes (if Sizable = TRUE)SFCOpenSectionsfccli.dllZoomed step/transition detailsWorkfield (left, top, w, h)Yes (Detailed faceplate view)SFCOpenPicturesfccli.dllStandalone full-screen SFC pictureFull screen canvasFixed or sizable by monitorSSMGetWorkFieldCoordinatesssmcli.dllCalculates active screen areaActive monitor displayN/A (Coordinate provider)

Implementing coordinate fallbacks ensures SFC windows display reliably regardless of client monitor resolution.

Verification

To verify that the SFC overview window renders correctly:
1. Activate WinCC Runtime on an OS Client or Single Station.
2. Click the SFC button or block icon.
3. Verify that the SFC Overview window opens immediately, filling the designated workfield area (> 1024x768 pixels).
4. Hover over the window border; confirm that the mouse cursor changes to the double-arrow resize handle.
5. Drag the window corners to verify smooth resizing, and verify that internal zoom controls allow panning across complex branches.

Limitations and Operational Precautions

  • Do not manually edit the compiled binary library sfccli.dll; only modify C-script wrappers in Graphics Designer.
  • When running the OS Project Editor to restore template screens, uncheck custom process pictures to prevent overwriting user graphics.
  • In multi-monitor systems, ensure all monitors operate at the same DPI scaling factor (100% recommended) to prevent coordinate miscalculations.
  • Ensure the target OS workstation possesses a valid SIMATIC PCS 7 SFC Visualization license in Automation License Manager.

Engineer FAQ

Why did the SFC window work properly on the Engineering Station but fail on a Client?

The Engineering Station often runs a single high-resolution monitor where default coordinates match, whereas the OS Client may utilize a multi-monitor configuration where SSMGetScreen requires specific monitor index offsets.

Can I zoom in and out inside the SFC Overview window?

Yes. The SFC visualization control includes native zoom buttons (100%, 75%, 50%, Fit to Window) on its top toolbar.

What license is required to view SFC charts in WinCC Runtime?

Viewing SFC charts in WinCC Runtime requires the 'SIMATIC PCS 7 SFC Visualization' runtime license installed on each operator station.

Technical References

Related Articles

Related Tags

  • SFC Visualization
  • SFCOpenOverview
  • SSMGetWorkFieldCoordinates
  • WinCC Picture Window
  • sfccli.dll
6 respuestas