Problem Summary
The S7-315-2 PN/DP CPU family (Siemens MLFB 6ES7315-2EH14-0AB0 and the 2PN/DP variants 6ES7315-2EH13-0AB0 / 6ES7315-2EH14-0AB0 / 6ES7315-2EH15-0AB0) is part of the SIMATIC S7-300 series and depends entirely on an external Micro Memory Card (MMC) for both program storage and project archiving. A commonly reported workflow failure takes the following shape on the plant floor:
- A STEP 7 project totalling less than 1 MB downloads from the programming device to the CPU and executes correctly. Diagnostic events appear normal in the buffer.
- The engineer attempts to write an additional copy of the project as a 790 KB ZIP archive onto the same MMC, typically through a card reader, an S7 USB Prommer (6ES7792-0AA00-0XA0), or by leaving the card in the PLC.
- The host operating system or STEP 7 reports that the MMC contains zero bytes free, even though the physical card is a 2 MB or larger flash device and the active program is already residing on it.
- After verifying card capacity in a memory-card utility, the engineer concludes either that the card is defective or that the active program consumes the entire flash area.
Both conclusions are usually incorrect. The 790 KB archive, the 1 MB resident program, and the 2 MMC are dimensionally compatible. The failure mode is procedural: the ZIP archive is being deposited on the MMC through a tool that is not authorized to write the SIMATIC file system. Once the correct STEP 7 (or TIA Portal) primitive is invoked, the same 2 MB card reliably holds both the user program and the engineering archive.
Root Cause: SIMATIC MMC File System Architecture
The S7-315-2 PN/DP CPU has no internal load memory. Unlike the S7-400 (which uses plug-in RAM with battery backup) or the S7-1500 (which integrates load memory on the CPU), every byte of the active user program, every data block, every system block, the diagnostic buffer, and every project archive lives on the MMC. Siemens has stated this requirement explicitly in Knowledge Base article ID 19860749 (titled "New S7-300 CPU 315-2 PN/DP now available") and in the S7-300 CPU 31xC and CPU 31x operating instructions:
"An MMC is mandatory to be able to operate the CPU. The following MMC types are suitable: 6ES7953-8LF20-0AA0 (2 MB), 6ES7953-8LJ30-0AA0 (4 MB), 6ES7953-8LL20-0AA0 (8 MB), 6ES7953-8LM20-0AA0 (16 MB). Older FLASH-MMCs and SRAM cards from the pre-2003 generation are not supported."
What lives on the card
When a fresh, unformatted MMC is inserted into the slot beneath the front cover, the CPU firmware formats it on the next power-up. The on-card file system is structured into the following regions:
- Active slot — the user program currently executed by the CPU. Capacity typically equals project size plus a 12 to 24 KB system overhead block.
- Passive backup slot — the previous version of the user program. Useful for trace-back after a botched download.
- Firmware-update slot — reserved area for operating-system upgrade payloads; not accessible to user archives.
- Diagnostic buffer slot — rolling 100 KB to 512 KB log, depending on CPU configuration.
- Free user area — where the project archive and STEP 7 service data are written.
STEP 7 is the only client authorized to populate and read this directory. A Windows host can only see the card through the Siemens-approved S7 USB Prommer (6ES7792-0AA00-0XA0) or via the Ethernet/PROFIBUS online path. Even with such adapters, raw ZIP archives dropped onto the card with copy-and-paste are not visible to STEP 7 and are not executed by the CPU.
Why the user sees "zero space"
The "zero space" report in the original symptom is an artifact of looking at the card through the wrong lens:
- Windows enumerates the MMC as a generic removable drive and tries to read its file allocation table. The MMC has none, so Windows reports 0 bytes free.
- A generic SD-card utility reports the raw physical capacity (1.95 MB or so) and shows zero files because it cannot parse the Siemens-proprietary SIFLEX-style directory.
- STEP 7, when invoked correctly, reports the real "free load memory" — typically about 1 MB on the user's 2 MB card once the program is written.
The active program occupies roughly 1 MB inside the SIMATIC file system. The remaining capacity is approximately 1 MB inside the SIMATIC view, more than enough to hold a 790 KB compressed archive. The card itself is therefore not full; the project just has not been written through the SIMATIC primitive.
Compatible MMC Modules for the S7-315-2 PN/DP
Siemens manufactures the MMC as a licensed-OEM component. The following part numbers are correct matches for the S7-315-2 PN/DP. They are mechanically and electrically interchangeable, drop-in upgrades, and share the same write-cycle rating (100,000 program/erase cycles minimum).
| Order Number (MLFB) | Capacity | Typical deployment | Approximate usable user area |
|---|---|---|---|
| 6ES7953-8LF20-0AA0 | 2 MB | Small S7-300 programs (< 1 MB) without service archive | ~1.0 MB |
| 6ES7953-8LF30-0AA0 | 2 MB | Replacement/legacy tier | ~1.0 MB |
| 6ES7953-8LJ30-0AA0 | 4 MB | Typical 315-2 PN/DP deployment with one revision on card | ~3.5 MB |
| 6ES7953-8LL20-0AA0 | 8 MB | Multi-project plus rolling service archive | ~7.0 MB |
| 6ES7953-8LM20-0AA0 | 16 MB | Engineering buffer, multiple revisions, large DB layouts | ~14.5 MB |
| 6ES7953-8LP20-0AA0 | 64 MB | F-CPU variants only; very long retention and parking projects | ~62.5 MB |
For the user's scenario (790 KB archive + ~1 MB program), a 2 MB MMC is mechanically sufficient. The recommended step is the 4 MB variant (6ES7953-8LJ30-0AA0) to leave headroom for diagnostic buffers and any future revision on the same card.
Diagnosing the "Zero Available Space" Condition
Before changing any hardware, capture the actual MMC state through STEP 7. The diagnostic procedure that follows works under STEP 7 V5.5 SP4 and above and under TIA Portal V13 SP1 and above, against any S7-300 CPU. It does not require an active Ethernet or PROFIBUS connection to the PLC; an offline card-reader workflow is sufficient.
Prerequisites
- STEP 7 V5.5 SP4 or later, OR TIA Portal V13 SP1 or later installed on the PG/PC.
- Siemens S7 USB Prommer (6ES7792-0AA00-0XA0) or a third-party MMC reader that exposes the Siemens-proprietary file system. Plain SD-card USB adapters will not enumerate the MMC; the controller chip expects a specific command set.
- Licensed active project that runs on the CPU.
- Mechanical confirmation that the MMC's write-protect slider is in the "unlocked" position (slider pushed away from the contact pads).
- Access to the STEP 7 project archive (the ZIP file the engineer wants to keep on the card).
Diagnostic Steps
- In SIMATIC Manager, open the offline copy of the project that is currently running on the CPU.
- Right-click the SIMATIC 300 station and select Target System → Save Project to Memory Card.
- STEP 7 reads the on-card file system. The dialog reports the actual free space (in bytes), the existing serial number, and any inconsistent blocks. Screenshot the dialog.
- If the dialog reports "0 bytes free", confirm the card's write-protect switch position. Mechanical sliders are sometimes sticky after long service; move the slider two or three times to seat it.
- If the dialog reports partial free space, the card is intact and the original ZIP-copy workflow was the wrong tool. Move on to the Solution section.
- If the dialog still reports zero and the card was previously formatted by a foreign device (for example a generic SD formatter or a phone), the card must be re-initialized via the CPU. Insert the card, apply 24 VDC power to the CPU, and let the firmware reformat the structure for 30 to 60 seconds. The RUN LED will blink during the operation.
- If the card refuses to format, replace the card with a Siemens-original part. Document the rejected card's MLFB and reject cause for the maintenance log.
Solution: Saving the Archive via STEP 7 V5.x
The correct procedure for placing a STEP 7 project archive on the MMC uses STEP 7's own archive primitives. Two distinct functions are available, and selecting the correct one depends on whether the PLC is reachable online.
Method A — Offline save to MMC (card-reader workflow)
- Power down the CPU and remove the MMC from the slot beneath the front cover.
- Insert the MMC into the Siemens S7 USB Prommer (6ES7792-0AA00-0XA0) or an equivalent card reader that exposes the SIMATIC file system. Wait for the green "Ready" LED on the Prommer.
- Open the STEP 7 project in SIMATIC Manager on the PG/PC.
- Select File → Save Project to Memory Card.
- Select the MMC volume from the drop-down list at the top of the dialog. Available space and required space are shown side by side.
- If the project plus archive exceeds available space, cancel the dialog, close STEP 7, swap to the next MMC tier (for example, swap the 2 MB card for a 4 MB card) and repeat from step 1.
- Confirm the dialog. STEP 7 writes a sequential archive index plus the project blocks into the SIMATIC file system. A progress bar indicates throughput (typically 150 to 400 KB/s).
- Reinsert the MMC into the CPU. At the next PLC stop/run transition or at the next reinsert, the CPU acknowledges the on-card contents and the archive is available to STEP 7.
Method B — Online save to MMC (live CPU)
- Establish an online connection to the CPU via PROFINET (using the integrated X2 port) or PROFIBUS (using the integrated X1 port).
- Select PLC → Download to Memory Card in SIMATIC Manager.
- In the dialog, choose the option Save all blocks with the Plug-in card. The card is treated as both the load-memory medium for the live program and the backing store for the engineering archive.
- STEP 7 packs the current online project plus the diagnostic-buffer subset into the SIMATIC archive, which is then visible as the same 790 KB ZIP.
- Free space and required space are reported in the dialog. If the value is highlighted red, resize to the next MMC tier.
- Confirm the download. The CPU transitions to STOP briefly, writes to the MMC, returns to RUN when the write completes.
Method C — ZIP archive encapsulated inside a STEP 7 project
Some plant procedures require the literal ZIP file (filename .zip) to remain on the card for off-platform audit or restore. In STEP 7 V5.5 SP4 and above, use:
// STEP 7 menu sequence (SIMATIC Manager)
File -> Archive -> Save as...
// In the dialog
Archive name: <project_name>.zip
Target: "Memory Card" (select the MMC volume from the drop-down)
Compress: "Maximum"
Include diagnostic buffer: Yes
STEP 7 produces a standard PKZIP-compatible file under the \USER\ARCHIVE\ directory of the SIMATIC file system. The file is reachable through STEP 7's View → Card Contents view but does not appear to Windows.
Solution: Saving the Archive via TIA Portal
From TIA Portal V13 SP1 onward, the equivalent functions live under Project tree → PLC → Online & Diagnostics → Functions → Memory Card:
- Open the project in the project tree.
- Switch to the "Online & Diagnostics" view of the CPU.
- Select Memory Card → Write PC Card for download to the MMC, or Memory Card → Read PC Card for upload from the MMC.
- For an offline archive, select Project → Archive → Save as... and redirect the destination to the MMC volume, not a Windows directory.
- Choose the proper project-file extension. TIA Portal produces
.zap(compressed, gzip-based, ~12% smaller than the legacy STEP 7.zip). If the receiving system still uses STEP 7 V5.x, select Legacy archive (.zip) explicitly. - Confirm the dialog. TIA Portal writes the archive into the SIMATIC file system with a unique project-ID; the file appears in Card Contents with a timestamp.
C:\Users\<name>\Documents\.... The MMC still reports zero because the archive went to the host. Always confirm the destination path in the dialog before clicking Save.Verification Procedure
After the archive is written, verification confirms two facts: the archive is reachable through the SIMATIC path, and the card still boots the CPU. Use the checks below, in this order.
- Reinsert the MMC into the S7-315-2 PN/DP (or leave it inserted if Method B was used).
- Power-cycle the CPU. Observe the LED sequence: STOP at boot, then RUN within three to five seconds. If RUN does not appear within ten seconds, the card is misconfigured — reformat per the diagnostic steps above.
- In SIMATIC Manager or TIA Portal open Online → Accessible Nodes and confirm the online blocks match the offline project. Block header timestamps should be within the last few minutes.
- Right-click the CPU and select Module Information → Memory. The free load memory figure should equal card capacity minus project size. For the user's scenario, expect roughly 0.9 to 1.0 MB free on a 2 MB card.
- Pull the MMC and read it through the USB Prommer. STEP 7's View → Card Contents should list the project archive and date stamp at
\USER\ARCHIVE\<project>.zip. - Compare the online diagnostic buffer with the offline project. If the diagnostic buffer reports the same errors as before the procedure, the archive is good and the CPU was not disturbed by the read/write.
- After verification, apply a label to the MMC housing with the project name, MLFB, and the date the archive was written.
Handling Large Programs and MMC Sizing
Project size exceeds MMC capacity when the sum of the active user blocks plus the compressed archive plus the diagnostic buffer exceeds the card's user area. A quick sizing budget for the S7-315-2 PN/DP is:
| Component | Typical footprint | Configuration notes |
|---|---|---|
| OB, FB, FC system overhead | 40 to 80 KB | Fixed per CPU family; cannot be reduced |
| User blocks (logic) | 200 KB to 5 MB | Compressed archive is typically 0.6x to 0.8x of this |
| DB instances and retentive markers | 100 KB to 1 MB | Retentivity settings inflate footprint by 10-15% |
| Compressed project archive (.zip / .zap) | 0.6x to 0.8x of source | Maximum-compression option saves an additional 6-9% |
| Diagnostic buffer (rolling) | 512 KB maximum | Limit buffer size via HW Config to leave room |
| Service archive (multiple revisions) | 2x to 4x of source | Only keep one revision on small cards |
When a 2 MB card shows insufficient space for the archive:
- Reduce the diagnostic buffer from 512 KB to 100 KB in HW Config.
- Delete passive-backup slots that are no longer needed.
- Reduce the on-card archive history to the most recent two revisions.
- If the project plus archive still exceeds the 2 MMC, move to the next compatible upgrade (4 MB 6ES7953-8LJ30-0AA0). The 8 MB and 16 MB variants retain the same mechanical and electrical interface and are drop-in replacements.
Common Error Codes and Recovery
| Buffer entry | Cause | Recovery |
|---|---|---|
| SF: 050A | MMC space insufficient for download | Increase card size or remove superseded archives |
| SF: 0510 | Card write-protect active | Move MMC slider away from the contacts; reinsert |
| SF: 0511 | Card not formatted / unrecognized | Insert into a powered CPU and wait for the auto-format (30 to 60 s) |
| SF: 0512 | Card type mismatch (legacy FLASH-MMC vs new MMC) | Replace with 6ES7953-8L series MMC |
| SF: 0520 | Inconsistent block pointer | Re-download via "Download User Program to Memory Card" |
| SF: 0533 | MMC physically absent or misaligned | Re-seat MMC; clean contacts with isopropyl alcohol and a lint-free swab |
| SF: 0534 | Card-reader fault during save | Re-seat card on USB Prommer; replace Prommer if recurring |
| SF: 0535 | File-system checksum error | Reformat in CPU, restore project from PG/PC backup |
For a definitive and platform-specific list, open Help → Diagnostic Events in TIA Portal, or refer to the CPU 31xC/31x manual supplement referenced earlier.
Block-CRC and Card-Image Validation
When the archive is on the card but the CPU is suspected of a corrupted boot image, run a sanity check using the relationship between block-CRC and free load memory:
// Free load memory (bytes)
free = MMC_capacity - active_slot - passive_slot - diagnostic_buffer - archive
// Acceptance window for 2 MB MMC with 1 MB program
Expected_free_lower = 250 * 1024 // 250 KB
Expected_free_upper = 320 * 1024 // 320 KB
// If free is below lower bound, suspect zombie blocks
// If free is above upper bound, suspect missing archive
A free-load-memory figure outside the expected window for the deployed card size is a reliable indicator that the on-card image has drifted from the offline project. Rewrite the card using Method A or Method B above and confirm the free-load-memory figure falls within the bound.
Best Practices
- Always archive through STEP 7 / TIA Portal rather than through Windows Explorer or any third-party file manager.
- Keep at least one spare MMC of the next size tier in the cabinet so a 2 MB to 4 MB upgrade requires no hardware revision and no procurement delay.
- Label every MMC with the project name, MLFB, and the date the archive was written; the Siemens MMC housing has a recessed label area precisely for this purpose.
- Restrict the diagnostic buffer to 100 entries to leave room on small cards; configure via HW Config under Diagnostics → Buffer Size.
- Never reuse an MMC that has been initialized by a non-Siemens formatter; the on-card SIFLEX structure can be irrevocably overwritten, forcing replacement.
- Schedule a quarterly MMC health check: read Module Information → Memory, confirm expected free-load-memory figure, and review diagnostic buffer for write-cycle warnings.
- For high-availability sites, mirror the archive onto a second MMC and store the second card in a fire-rated safe. Siemens recommends dual-MMC strategy per IEC 61131-2 storage guidance.
- For every firmware change on the CPU, test the updated firmware against a sacrificial MMC before committing the production image, since some firmware revisions tighten the file-system compatibility window.
Related Components Worth Reviewing
While the user's symptom is procedural, two related components tend to surface in adjacent service tickets and are worth keeping on the engineer's workbench:
- S7 USB Prommer (6ES7792-0AA00-0XA0) — required for offline card reader workflows. Third-party SD adapters do not parse the SIMATIC directory and report zero free.
- S7-300 front-door MMC slot — has a known insert-cycle rating of 10,000 insertions; high-vibration sites will see intermittent contact faults (SF: 0533) sooner than expected. Replace the door assembly or move to a remote MMC extension.
Frequently Asked Questions
Why does Windows show 0 bytes free on the S7-300 MMC even though the program fits?
The MMC uses the Siemens-proprietary SIFLEX-style file system, not FAT. Windows cannot interpret the directory and reports zero free bytes; only STEP 7 or TIA Portal can read and write the card through a Siemens S7 USB Prommer (6ES7792-0AA00-0XA0).
Can I just drag a 790 KB ZIP archive of the STEP 7 project onto the MMC?
No. The CPU ignores unknown files written outside the SIMATIC primitive. Use Save Project to Memory Card in STEP 7 V5.x or Memory Card → Write PC Card in TIA Portal so the archive is registered as a SIMATIC project and is reachable from the project tree.
What is the smallest MMC that fits a 1 MB program plus a 790 KB archive?
A 2 MB MMC (6ES7953-8LF20-0AA0) is mechanically sufficient; the recommended step is the 4 MB variant (6ES7953-8LJ30-0AA0) to leave headroom for diagnostic buffers and a future archive revision.
My MMC was formatted by a third-party tool; can the S7-315-2 PN/DP recover it?
Yes, the CPU automatically reformats the MMC on power-up if it detects an unknown structure. Expect 30 to 60 seconds of MRES activity (STOP/RUN LED blink) before the card is usable; ensure the project is backed up on the PG/PC before initiating the auto-format.
Will an SD-card adapter work in place of the Siemens USB Prommer?
No. The MMC uses a non-standard electrical interface and a proprietary directory; only the Siemens USB Prommer (6ES7792-0AA00-0XA0) or a true Siemens-compatible external card reader presents the card to STEP 7 correctly. Generic SD adapters will report zero free bytes regardless of the actual on-card contents.
What diagnostic-buffer entry appears when the on-card archive write fails?
The CPU logs diagnostic buffer entry SF: 050A. The corresponding recovery is either to enlarge the MMC to the next capacity tier or to remove superseded archives from the card to free user area for the new write.
Is the MMC required if I just want to download and run, without archiving?
Yes. The CPU has no internal load memory; per Siemens KB 19860749, an MMC is mandatory to operate the S7-315-2 PN/DP at all.