Problem Description
The STEP 7 Professional 2010 LAD/STL/FBD Program Editor (the integrated block editor in SIMATIC Manager) terminates unexpectedly when the user attempts to save specific code blocks—most commonly OB1 (Organization Block, main cyclic program) and FC7 (Function, no instance DB) in the reported case. The crash is silent: no S7 exception, no Dr. Watson-style dump, no Windows error code, and no entry in the Application Event Log. The SIMATIC Manager window remains open, but the LAD/STL/FBD editor process has been killed and the in-memory block is lost. The "Save As → With Reorganization (slow)" command, which performs an internal defragmentation of the .s7p/.s7l project database, does not resolve the issue.
Environment & Affected Versions
| Component | Version in Reported Case | Notes |
|---|---|---|
| STEP 7 Professional | 2010 (V5.5 SPx) | Includes S7-SCL, S7-GRAPH, S7-PLCSIM |
| SIMATIC Manager | 5.5 + | Project type: STEP 7 V5.x Project |
| Controller family | SIMATIC S7-300 (also S7-400, C7) | Block container structure identical |
| OS | Windows 7 / XP Professional SP3 (typical) | STEP 7 V5.5 is not certified for Windows 10/11 |
| Project location | Local HDD or UNC network share | Network projects may exhibit additional symptoms |
The same symptom class has been observed on STEP 7 V5.4 SP5, V5.5, and V5.5 SP4. Because the editor is shared across these versions, the root cause is generally project-database (offline container) corruption rather than a STEP 7 binary defect.
Root Cause Analysis
A STEP 7 V5.x project is not a single file. It is a hierarchical folder tree of binary containers (Offline + Online view) with extension *.s7p at the root, *.s7l for libraries, and per-block *.awl (STL source) / *.inc (interface) pairs. The Symbols, HW Config, NetPro connection data, and the System Data (SDB) all live in their own subfolders. The Blocks folder, in particular, holds the compiled and source representations of OBs, FBs, FCs, DBs, SDBs, and SFB/SFC system blocks.
When the LAD/STL/FBD editor opens a block it reads three artefacts:
- The compiled
*.awlSTL representation - The interface description (IN/OUT/IN_OUT/TEMP/STAT/RETURN)
- The optional source file (if "with source" save was selected)
If any of these artefacts become inconsistent—for example, a torn write during a power loss, an antivirus quarantine of a single *.s7l subfile, a remote-share disconnect mid-flush, or an interrupted S7-PLCSIM import—the editor's internal consistency check can fail in an unrecoverable way. The save path calls SaveAs_Reorg() which writes a new block container; if the header CRC of the existing container is already bad, the reorg path also crashes. The result is a block that opens, appears valid in the working memory, but cannot be serialized back to disk.
Step-by-Step Recovery Procedure
The procedure below recovered the corrupted project in the reported case. It works by isolating the damaged container and re-creating a clean shell, then migrating the user content into it.
Prerequisites
- A working STEP 7 Professional 2010 installation with the same service pack level as the source PC
- Read/write access to the corrupted project folder (copy it to a local NTFS drive first; do not operate on a network share)
- Backups: take a zip copy of the entire
*.s7pfolder before any destructive step - Optional: S7-PLCSIM for offline test of the rebuilt project
Procedure
- Isolate the corruption. Create a new SIMATIC Manager project (File → New → Project) and a new SIMATIC 300 Station (or matching station type).
-
Build a clean hardware shell. Open HW Config and insert a rack matching the corrupted project's CPU slot, drag the same CPU (e.g.
6ES7 315-2EH14-0AB0/ CPU 315-2 PN/DP) and the same signal modules. The SDBs are regenerated automatically when HW Config is saved. - Copy the Blocks folder. In SIMATIC Manager, switch to the Offline view of the new project. Right-click the Blocks container → Copy. Navigate to the corrupted project's Blocks container, select all user blocks (OB1, OB100, FC1–FCn, FB1–FBn, DB1–DBn, UDTs), and Paste. System blocks (SDB, SFC, SFB) must NOT be copied; the new HW Config already produced fresh SDBs.
- Open and re-save the suspect blocks. Double-click OB1, then File → Save. Repeat for FC7. If the new project's editor now saves the blocks cleanly, the original project's Blocks container was the corruption source.
- Migrate HMI and Symbols. Copy the Symbols object (the global symbol table) and any WinCC flexible / HMI station objects from the corrupted project. Open OB1 once more and save to confirm the imported symbol table did not re-introduce the failure.
- Migrate NetPro and connections. Open NetPro in the new project, re-create the configured S7 connections to match the corrupted project. Save and compile (Options → Compile and Check All).
- Download to the controller (or PLCSIM). Use PLC → Download to test the rebuilt project end-to-end. Verify the OB1 cycle and FC7 logic execute as expected.
-
Archive the recovered project. Use File → Archive to produce a clean
*.zipor*.arjbackup. This forces a serial re-write of every block and is itself a "Save As Reorganization" against the whole project.
Alternative Recovery Methods
If the rebuild path is too expensive (large multi-station project, complex NetPro topology), try these in order before escalating to Siemens Support:
| Method | What it repairs | When to use |
|---|---|---|
| Save As → With Reorganization (slow) | Block container defragmentation | First attempt; reported to fail on severe corruption |
Delete the *.s7l symbol-cache file |
Symbol table cache | Editor crashes specifically on open, not save |
| Re-import blocks from STL source | Compiled block + source mismatch | Source files exist in Sources container |
| Copy networks to a new block | Network-level corruption in single block | Only one or two blocks affected; copy NW by NW |
| Compare blocks with online (in Online view) | Drift detection | Online→Offline download possible to overwrite damaged offline |
Restore from *.zip archive |
Whole-project rollback | If a clean archive exists from before the corruption |
Network-by-Network Migration
For a single damaged block, open the block in both the corrupted and the new project side by side. In the corrupted block, right-click each network → Copy. In the new block, place the cursor at the end of the last network and Paste. Save the new block. If the new block saves, the corruption was isolated to one of the migrated networks—revert and re-paste individually to localize the bad network.
Pulling Live Content from the Controller
If the CPU is online with a working program, use PLC → Upload Station to PG on a fresh project. This rebuilds the offline tree from the controller's SDBs and blocks, bypassing the corrupt offline container entirely. Compare the uploaded project against the corrupted one with Options → Compare Blocks (Online vs. Offline, then Project vs. Project) to detect the corrupt area.
Project Reorganization Best Practices
- Always archive before debugging crashes. Use File → Archive (not the Windows ZIP shell) to produce a STEP 7-native archive. The native archiver walks the project in a defined order and skips locked/temp files; the shell ZIP can pick up half-written containers.
- Keep Sources in sync with Blocks. Generate STL source (File → Generate Source) for every block after each save. STL source is plain ASCII and far less susceptible to silent corruption than the binary compiled view. To recompile: open the source file, File → Compile.
-
Avoid antivirus real-time scanning of
*.s7ptrees. Pattern-matching AV can quarantine or scrub*.awlfiles mid-write. Exclude the project root and any UNC path that hosts projects from real-time scanning. See the Siemens FAQ on antivirus compatibility for STEP 7 (entry ID 13173645) for the official exclusion list. - Disable Windows Search Indexer on the project root. Indexer holds short-lived read handles that can collide with SIMATIC Manager's exclusive-write model.
- Use local NTFS for active editing. Network shares (SMB 1.0/2.0) introduce latency and torn-write risk. Edit locally, copy out to the share only when the project is closed in SIMATIC Manager.
Virtual Machine Considerations
Many STEP 7 V5.5 sites run inside VMware Workstation/ESXi or Hyper-V. VMs introduce three risks specific to the editor:
-
Disk-image write coalescing. VMware's
*.vmemdelta and snapshot consolidation can defer flushes; a host crash can leave the project's*.s7pin a torn state. Disable "Allow Windows to manage paging" inside the guest, and configure the virtual disk as Independent – Non-persistent only for disposable test rigs. - Time-sync skew. STEP 7 stamps block headers with the PG time-of-day. A VM that re-syncs the clock backward (e.g. after a suspend/resume) can produce negative time deltas that confuse the offline container's internal sequence counters. Configure VMware Tools with "Time synchronization between the virtual machine and the host operating system" only when the host is NTP-synchronized.
- 3D/graphics driver mismatches. The LAD/FBD editor is a GDI-heavy application; a mismatched VMware SVGA driver can cause random editor closes that look identical to project corruption. Switch the VM's display to 16-bit color, 1024x768 as a sanity test.
Escalation Path to Siemens Support
If the rebuild path fails:
- Open a support request via the Siemens Industry Online Support portal. Use the Support Request entry under "My Support".
- Attach a sanitized project (strip proprietary code, retain block interfaces) in
*.zipform. Per the discussion, Siemens Sweden escalated a similar case to Germany without resolution—attach the smallest reproducible project to improve turnaround. - Provide the STEP 7 version (Help → About in SIMATIC Manager, including Service Pack) and the OS build (
winveroutput). - Generate a Windows process dump of the crashing
S7EWNDEX.EXE(LAD/STL/FBD editor) using Sysinternals ProcDump with-ma -e 1for a full dump on first-chance exceptions, and attach the*.dmpto the ticket.
Verification Checklist
After recovery, verify the rebuilt project is healthy:
- [ ] Open OB1, make a no-op change, save. Editor must close cleanly with the modified timestamp in the Blocks container.
- [ ] Open every FC, FB, DB, UDT, and re-save. Options → Check Block Consistency must report "No errors".
- [ ] PLC → Compile and Download All (with PG/PC interface set to PLCSIM or to the real CPU) must succeed.
- [ ] Options → Compare Blocks (Online vs. Offline) must show zero differences.
- [ ] File → Archive the project, then unzip to a new folder, then open in SIMATIC Manager. The unzipped project must open without errors (this exercises every container).
Troubleshooting Matrix
| Symptom | Likely cause | First action |
|---|---|---|
| Editor crashes on save, no error | Corrupt block container | Rebuild into new project (procedure above) |
| Editor crashes on open, no error | Corrupt *.awl or interface |
Regenerate from STL source in Sources |
| Editor crashes only on one PC | Local STEP 7 installation / GDI | Reinstall STEP 7; check video driver |
| Editor crashes on every PC with same project | Project-database corruption | Rebuild into new project |
| Editor crashes after "Save As Reorg" | Reorg inherited in-memory corruption | Close project, copy from archive, re-open |
| Editor crashes inside a VM only | Time-sync / disk-coalesce / video driver | Disable VM time sync, update VMware Tools |
| Editor crashes after Windows update | GDI regression or DEP policy | Roll back update or exclude S7EPAT*.EXE from DEP |
FAQ
What is the "Save As With Reorganization (slow)" command and why does it sometimes still crash?
It is File → Save As inside the LAD/STL/FBD editor, with the "with reorganization (slow)" checkbox selected. It rebuilds the offline block container from the in-memory block model and re-links the SDBs. It can still crash if the in-memory model itself was hydrated from a corrupt container, because the reorg serializes the same broken model back to disk.
Will reinstalling STEP 7 fix a crash that happens on every PC with the same project?
No. If the project reproduces the crash on three or more PCs with different STEP 7 installations, the corruption is in the project files (the *.s7p tree, the Blocks container, or the symbol cache), not in the editor binary. The recovery procedure in this article rebuilds the project in a fresh shell and migrates the user content.
Can I recover blocks from the controller when the offline project is corrupt?
Yes. Open a brand new SIMATIC Manager project, configure the PG/PC interface for the correct MPI/PROFIBUS or TCP/IP connection, and use PLC → Upload Station to PG. The uploaded offline tree is generated from the controller's live SDBs and blocks, bypassing the corrupt offline container. Compare with the original corrupted project using Options → Compare Blocks to localize the damage.
Do I need to copy the system blocks (SFB, SFC, SDB) when migrating user blocks?
No. The new project's HW Config generates fresh SDBs that match the configured rack. SFB and SFC live in the CPU firmware, not in the project. Copying SDBs from a different HW configuration is the most common cause of "inconsistent system data" download errors after a manual block copy.
How do I produce a project dump for Siemens Support if the rebuild also fails?
Use Sysinternals ProcDump to capture a full user-mode dump of S7EWNDEX.EXE (the LAD/STL/FBD editor process) on the first crash: procdump -ma -e 1 -x \<dumpfolder\> S7EWNDEX.EXE. Zip the resulting *.dmp, the sanitized *.s7p project, and the winver / STEP 7 About output, and attach all three to a Siemens Industry Online Support request.