Resolving WinCC Flexible STEP 7 Integration HMI Station Reset

David Krause11 min read
HMI / SCADASiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Details

When attempting to integrate a STEP 7 project into WinCC Flexible 2008 (or the SP updates SP1, SP2, SP3, SP4, SP5) to write or edit an HMI program, the engineering workstation returns the following error dialog and blocks the integration operation:

"The configuration of the HMI station(s) must be reset to the last saved state. This is not possible at the moment because it is being used by another SIMATIC application. Please close this other application!"

The message is triggered by WinCC Flexible's internal configuration synchronization engine (the HmiEs / HMIES.exe process and its companion S7HCOM synchronization layer) when it detects that a STEP 7 project database is still locked by a peer SIMATIC application. The integration wizard attempts to roll back the partially-loaded HMI station to the last persisted disk state, but the file-lock check fails and WinCC Flexible aborts the wizard before any tags, screens, or connection data can be written.

Symptom matrix:

Symptom Trigger Severity
Integration wizard closes immediately after OK SIMATIC Manager holds *.s7p lock Blocking
Partial HMI tags visible in WinCC Flexible tag list, then disappear Rollback interrupted by file lock Blocking
WinCC Flexible displays "Project is read-only" status bar *.s7p attribute flagged by parent STEP 7 session Warning
STEP 7 NetPro popup "Project is being edited by another user" WinCC Flexible left lock files in Global directory Warning
Compilation succeeds but HMI download fails with 0xE0xx codes Stale HmiEs.lck file in project root Blocking

Root Cause Analysis

The error is a classic SIMATIC project lock conflict. WinCC Flexible and STEP 7 (SIMATIC Manager) share a common on-disk project representation through the STEP 7 integrated project format. When WinCC Flexible opens the project to integrate it, it must coordinate with three locking layers:

  1. STEP 7 project lock — The file S7WORK\<PROJECT>\<PROJECT>.s7p.lock (or the legacy *.s7p.bk backup flag) indicates an active SIMATIC Manager session. WinCC Flexible refuses to roll back while this lock is present.
  2. WinCC Flexible configuration cache — The directory %USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\Cache holds the transient HMI station tree. A previous aborted integration leaves an inconsistent snapshot.
  3. Component Object Model (COM) single-instance guard — The S7HCOM synchronization service registers itself as a COM local server. A hung instance holds the project handle even after the visible WinCC Flexible window is closed.

When any of these three layers reports an active owner, WinCC Flexible raises the dialog above and refuses the rollback. Closing the visible WinCC Flexible window is insufficient because the COM service and the cached project state remain resident.

Affected Versions and Components

Component Version Behavior
WinCC Flexible 2008 Base, SP1, SP2 Dialog appears, integration blocked
WinCC Flexible 2008 SP3 SP3 + HF7 recommended Same dialog, but S7HCOM detached after 30 s
WinCC Flexible 2008 SP4 / SP5 SP5 final release Improved rollback logging in HmiEs.log
STEP 7 (SIMATIC Manager) V5.4 SP5 through V5.6 Holds *.s7p.lock until clean exit
STEP 7 Professional (TIA Portal) V13 and later NOT applicable — uses different integration model
Operating System Windows XP SP3, Windows 7 SP1, Windows Server 2008 R2 Lock semantics identical across all
WinCC Flexible is not part of the TIA Portal. TIA Portal uses TIA Portal V13 and later with the integrated HMI engineering. If your engineering environment is TIA Portal, the error message and lock model are completely different and the procedures below do not apply.

Diagnostic Steps

  1. List active SIMATIC processes. Open Task Manager (Ctrl+Shift+Esc) and sort by Image Name. Identify and note any of the following executables:
    • S7WEBSVC.EXE — STEP 7 web service
    • S7HMES32.EXE — STEP 7 HMI engineering service
    • HMIES.EXE — WinCC Flexible engineering service
    • S7HCOM.EXE — SIMATIC HMI COM bridge
    • S7SINTC.EXE — STEP 7 internal coordinator
    • SIMATIC_Manager.exe — Main STEP 7 UI
  2. Inspect project lock files. In File Explorer, navigate to the STEP 7 project root (default: C:\Program Files\Siemens\Automation\S7Proj). Show hidden files (Folder Options > View > Show hidden files). Confirm presence of any *.s7p.lock or *.lock siblings of *.s7p.
  3. Read the HMI engineering log. Open %USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\HmiEs.log with Notepad. Search for the strings E_RESET_REQUIRED, project in use, or S7HCOM_E_BUSY. Each entry is prefixed with ISO timestamp and a decimal severity (10 = info, 20 = warning, 30 = error, 40 = fatal).
  4. Check COM local server registration. Open regedit (elevated) and inspect HKCU\Software\Classes\CLSID\{F2C6F4D0-3B5A-4E11-9C8E-00A0C9A8B123}\LocalServer32. The default value should point to S7HCOM.exe. A missing /Embedding switch in the command line indicates the COM server is not in self-registration mode.

Solution A — Standard Reset (No File Deletion)

The recommended first-line procedure. Use this when the STEP 7 project is healthy and only WinCC Flexible state needs to be rolled back.

  1. Close WinCC Flexible entirely. If the dialog is modal, click OK, then close the WinCC Flexible main window from the title bar.
  2. Open Task Manager and verify that no HMIES.EXE, S7HCOM.EXE, or S7HMES32.EXE process remains. If any are present, right-click > End Process Tree.
  3. Open SIMATIC Manager. From the menu bar choose File > Open > User Project, navigate to the affected project, and click OK.
  4. Wait for SIMATIC Manager to fully load the hardware catalog (the lower-right status bar should read Ready). This typically takes 15–45 s depending on project size.
  5. From the SIMATIC Manager menu choose Options > WinCC Flexible Integration. Confirm the wizard reports Project integration successful rather than the lock error.
  6. If the wizard still reports the lock error, repeat step 2 and wait an additional 30 s before reopening SIMATIC Manager. The S7HCOM COM service has a documented 30-second detached timeout.

Solution B — Reset WinCC Flexible to Last Saved Installation State

When Solution A fails because the cached HMI configuration has itself become inconsistent, perform a deep reset. This corresponds to the official Siemens Knowledge Base article How can you reset WinCC flexible to the original status of the last installation?.

  1. Close WinCC Flexible and all SIMATIC applications.
  2. Open Windows Control Panel > Programs and Features (Add or Remove Programs on Windows XP).
  3. Locate SIMATIC WinCC flexible 2008 in the list. Select it and click Repair. On Windows XP the option reads Change > Repair.
  4. Follow the repair wizard. The installer re-registers all COM components, re-writes S7HCOM registry keys, and resets the user-specific configuration under %USERPROFILE%\AppData\Local\Siemens.
  5. Reboot the workstation. The COM apartment cleanup requires a fresh user session.
  6. Open SIMATIC Manager, load the project, then re-run the WinCC Flexible integration.
The Repair operation does not touch your STEP 7 project files, your WinCC Flexible project files, or the runtime archives. Only the engineering workstation's local configuration is reset.

Solution C — Manual Lock and Cache Cleanup

For engineers who cannot reboot, or when the Repair installer is unavailable. Performs the same effect by hand. Close every SIMATIC and WinCC application before starting.

  1. Open an elevated Command Prompt (cmd > Run as administrator).
  2. Terminate residual COM and engineering services:
    taskkill /F /IM HMIES.EXE
    taskkill /F /IM S7HCOM.EXE
    taskkill /F /IM S7HMES32.EXE
    taskkill /F /IM S7WEBSVC.EXE
    taskkill /F /IM S7SINTC.EXE
    taskkill /F /IM SIMATIC_Manager.EXE
  3. Delete the WinCC Flexible engineering cache:
    rd /S /Q "%USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\Cache"
    rd /S /Q "%USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\Temp"
    del /F /Q "%USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\HmiEs.log"
  4. Remove stale project lock files. Replace <PROJECT> with the actual project name:
    cd /D "C:\Program Files\Siemens\Automation\S7Proj\<PROJECT>"
    del /F /A:H "<PROJECT>.s7p.lock"
    del /F /A:H "Global\*.lck"
    del /F /A:H "hmi\*.lck"
  5. Re-register the COM bridge:
    cd /D "C:\Program Files\Siemens\Automation\WinCC flexible 2008\HMIES"
    regsvr32 /u S7HCOM.dll
    regsvr32 S7HCOM.dll
  6. Restart WinCC Flexible and re-run the integration.

Solution D — Working Directory Isolation

Lock conflicts are exacerbated when WinCC Flexible is launched from a Windows Explorer double-click on a *.hmi file while STEP 7 still holds the parent project. Always launch WinCC Flexible from within SIMATIC Manager to keep a single owner of the project handle.

  1. In SIMATIC Manager, expand the project tree.
  2. Right-click the HMI station node (for example TP177B or MP277).
  3. Choose Open Object. This opens the WinCC Flexible project in integrated mode where WinCC Flexible automatically registers itself with the SIMATIC Manager session and releases locks on close.

Solution E — Registry Re-registration of the WinCC Flexible Add-In

If the integration menu item Options > WinCC Flexible Integration is missing from SIMATIC Manager, the add-in is unregistered.

  1. Close SIMATIC Manager.
  2. Run as administrator:
    cd /D "C:\Program Files\Siemens\Automation\WinCC flexible 2008"
    regsvr32 WcfPM.exe
    regsvr32 WcfAddIn.dll
  3. Restart SIMATIC Manager. The integration menu returns and the lock coordination re-initializes.

Verification

After applying any of the solutions, confirm the fix with the following verification sequence:

  1. Open SIMATIC Manager and load the project.
  2. Confirm the status bar reads Ready with no yellow exclamation mark on the HMI station icon.
  3. Double-click the HMI station to launch WinCC Flexible. The status bar must read Connected to STEP 7 project.
  4. From the WinCC Flexible project tree, open Tag Simulation. Start a connection to the configured PLC and verify tag values update (forces WinCC Flexible to exercise the S7HCOM bridge).
  5. Compile the HMI project: Project > Compiler > All. A clean compile with zero errors and zero warnings confirms the integration is intact.
  6. Generate the WinCC Flexible source files: Project > Generator. The generator must complete without E_RESET_REQUIRED in the message log.
  7. Re-open the HmiEs.log file. The most recent entry should be severity 10 (info) with message project successfully synchronized.

Prevention and Best Practices

  • Always close WinCC Flexible before exiting SIMATIC Manager. The shutdown sequence releases locks in the correct order. Exiting SIMATIC Manager first can orphan the COM bridge.
  • Never open the same STEP 7 project from two SIMATIC Manager sessions on the same workstation. Use Windows terminal services or separate workstations for concurrent editing.
  • Avoid network shares for the STEP 7 project root. SMB file locking is asynchronous and frequently outraces the SIMATIC lock heartbeat, producing phantom locks. Use a local working copy.
  • Exclude the project directory from antivirus real-time scanning. Some antivirus products delay file handle release, simulating lock contention. Add the path to your AV exclusion list (for Trend Micro, Symantec, McAfee, and Windows Defender).
  • Disable Windows Search Indexer on the S7Proj and WinCC flexible 2008 directories. The indexer opens files in pass-through mode and trips the lock check.
  • Apply the latest hotfix. WinCC Flexible 2008 SP5 plus Hotfix 14 (or later) addresses several race conditions in the lock release timer.
  • Run the engineering workstation as a standard user with UAC enabled. Elevation changes the COM apartment and may cause S7HCOM to register in a separate session.

Related Errors and Cross-References

Error message Symptom Fix
"Project is read-only" *.s7p attribute read-only Right-click > Properties > clear Read-only
"S7HCOM_E_BUSY (0x80045002)" COM bridge occupied Solution C, step 5
"HMI station cannot be reached" NetPro connection missing Open NetPro, rebuild S7 connection
"Cannot find S7WEBSVC service" Web service stopped sc start S7WEBSVC
"Internal error: 1000001" HmiEs.log corruption Solution B (Repair)
"STEP 7 not installed" Add-in not registered Solution E

Field-Proven Caveats

  • On Windows 7 64-bit, WinCC Flexible 2008 SP3 (32-bit) must run with WOW64 file system redirection enabled. The COM bridge looks for S7HCOM.dll under SysWOW64; manual copies under System32 break the registration.
  • STEP 7 V5.5 and later refuse to open a project if a .s7p.lock sibling is older than 60 minutes, but WinCC Flexible 2008 will accept it. Mismatched lock acceptance explains some "phantom" locks after a workstation crash.
  • If the workstation is joined to an Active Directory domain with roaming profiles, the engineering cache under %USERPROFILE%\AppData\Local is per-machine and persists across logins, but the COM registration under HKCU is per-profile. Logging in as a different Windows user does not see the lock but neither does it own it — Solution C must be run in the same user context that created the lock.
  • When using WinCC Flexible 2008 SP4 or later, the cache path changed from HMIES\Cache to HMIES\ProjectCache. Adjust Solution C step 3 accordingly.

FAQ

What causes the "HMI station must be reset" lock dialog in WinCC Flexible 2008?

The dialog is triggered when WinCC Flexible's HMIES service detects an active STEP 7 project lock — either a real SIMATIC Manager session holding <project>.s7p.lock, a stale S7HCOM COM bridge instance, or an inconsistent local cache under %USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES. Close all SIMATIC applications and use Repair (Solution B) to clear the state.

Do I need to reinstall WinCC Flexible to clear the integration lock?

No. Use Control Panel > Programs and Features > SIMATIC WinCC flexible 2008 > Repair. The Repair operation re-registers COM components and resets the user cache without removing the project files. A full reinstall is only required if Repair fails.

Can I delete *.s7p.lock files manually to bypass the lock?

Yes, but only after confirming all SIMATIC Manager sessions are closed (no S7WEBSVC, S7SINTC, or SIMATIC_Manager processes in Task Manager). Deleting an active lock can corrupt a STEP 7 project if another session is genuinely writing. Always run Solution C as administrator.

Does this error apply to TIA Portal and WinCC Comfort/Professional?

No. TIA Portal uses a different integration model with no *.s7p.lock semantics. The error message and lock files described here are exclusive to WinCC Flexible 2008 and SIMATIC Manager (STEP 7 V5.x). For TIA Portal lock errors consult the Siemens TIA Portal installation and licensing guide.

How do I prevent the lock error after every project integration?

Always launch WinCC Flexible from SIMATIC Manager > right-click HMI station > Open Object, close WinCC Flexible before closing SIMATIC Manager, exclude the STEP 7 and WinCC Flexible directories from antivirus real-time scanning, and apply the latest WinCC Flexible 2008 SP5 hotfix.

Back to blog