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:
-
STEP 7 project lock — The file
S7WORK\<PROJECT>\<PROJECT>.s7p.lock(or the legacy*.s7p.bkbackup flag) indicates an active SIMATIC Manager session. WinCC Flexible refuses to roll back while this lock is present. -
WinCC Flexible configuration cache — The directory
%USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\Cacheholds the transient HMI station tree. A previous aborted integration leaves an inconsistent snapshot. -
Component Object Model (COM) single-instance guard — The
S7HCOMsynchronization 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 |
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
-
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
-
-
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.lockor*.locksiblings of*.s7p. -
Read the HMI engineering log. Open
%USERPROFILE%\AppData\Local\Siemens\WinCC flexible 2008\HMIES\HmiEs.logwith Notepad. Search for the stringsE_RESET_REQUIRED,project in use, orS7HCOM_E_BUSY. Each entry is prefixed with ISO timestamp and a decimal severity (10 = info, 20 = warning, 30 = error, 40 = fatal). -
Check COM local server registration. Open
regedit(elevated) and inspectHKCU\Software\Classes\CLSID\{F2C6F4D0-3B5A-4E11-9C8E-00A0C9A8B123}\LocalServer32. The default value should point toS7HCOM.exe. A missing/Embeddingswitch 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.
- Close WinCC Flexible entirely. If the dialog is modal, click OK, then close the WinCC Flexible main window from the title bar.
- Open Task Manager and verify that no
HMIES.EXE,S7HCOM.EXE, orS7HMES32.EXEprocess remains. If any are present, right-click > End Process Tree. - Open SIMATIC Manager. From the menu bar choose File > Open > User Project, navigate to the affected project, and click OK.
- 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.
- From the SIMATIC Manager menu choose Options > WinCC Flexible Integration. Confirm the wizard reports Project integration successful rather than the lock error.
- If the wizard still reports the lock error, repeat step 2 and wait an additional 30 s before reopening SIMATIC Manager. The
S7HCOMCOM 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?.
- Close WinCC Flexible and all SIMATIC applications.
- Open Windows Control Panel > Programs and Features (Add or Remove Programs on Windows XP).
- Locate SIMATIC WinCC flexible 2008 in the list. Select it and click Repair. On Windows XP the option reads Change > Repair.
- Follow the repair wizard. The installer re-registers all COM components, re-writes
S7HCOMregistry keys, and resets the user-specific configuration under%USERPROFILE%\AppData\Local\Siemens. - Reboot the workstation. The COM apartment cleanup requires a fresh user session.
- Open SIMATIC Manager, load the project, then re-run the WinCC Flexible integration.
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.
- Open an elevated Command Prompt (cmd > Run as administrator).
- 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 - 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" - 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" - Re-register the COM bridge:
cd /D "C:\Program Files\Siemens\Automation\WinCC flexible 2008\HMIES" regsvr32 /u S7HCOM.dll regsvr32 S7HCOM.dll - 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.
- In SIMATIC Manager, expand the project tree.
- Right-click the HMI station node (for example
TP177BorMP277). - 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.
- Close SIMATIC Manager.
- Run as administrator:
cd /D "C:\Program Files\Siemens\Automation\WinCC flexible 2008" regsvr32 WcfPM.exe regsvr32 WcfAddIn.dll - 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:
- Open SIMATIC Manager and load the project.
- Confirm the status bar reads Ready with no yellow exclamation mark on the HMI station icon.
- Double-click the HMI station to launch WinCC Flexible. The status bar must read Connected to STEP 7 project.
- 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
S7HCOMbridge). - Compile the HMI project: Project > Compiler > All. A clean compile with zero errors and zero warnings confirms the integration is intact.
- Generate the WinCC Flexible source files: Project > Generator. The generator must complete without E_RESET_REQUIRED in the message log.
- Re-open the
HmiEs.logfile. The most recent entry should be severity 10 (info) with messageproject 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
S7ProjandWinCC flexible 2008directories. 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
S7HCOMto 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.dllunderSysWOW64; manual copies underSystem32break the registration. - STEP 7 V5.5 and later refuse to open a project if a
.s7p.locksibling 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\Localis per-machine and persists across logins, but the COM registration underHKCUis 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\CachetoHMIES\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.