S7-300 MMC Capacity, Project Archiving, and I/O Recovery

David Krause17 min read
S7-300SiemensTechnical Reference
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

S7-300 MMC Capacity, Project Archiving, and I/O Recovery Reference

The S7-300 family stores all retained user blocks and the entire STEP 7 project on a Micro Memory Card (MMC). Engineers who arrive at a system with a CPU in their hands but no backup of the offline project routinely face three questions: how large can the MMC be, what can actually be written to it, and how do I recover an I/O list when the source has been lost. This reference consolidates Siemens Industry Online Support guidance with field-procedures for those three problems, including the S7-300 CPU family limits, the STEP 7 V5.x and TIA Portal archive workflows, and diagnostic techniques for reconstructing an I/O map from the running CPU alone.

1. S7-300 Storage Architecture Overview

The S7-300 CPU separates memory into three functional areas. Understanding them is a prerequisite for any MMC question because each area answers a different persistence requirement.

Load Memory (MMC, non-volatile flash) Work Memory (RAM, volatile) Retentive Memory (NVRAM, buffered by battery/ES) copy on power up battery / Energy Storage

Load memory lives entirely on the MMC for any MMC-based CPU (i.e. all S7-300 CPUs except the early CPU 312 IFM and 312C variants that still used 5 V FEPROM cards). Load memory holds the compiled blocks (OB, FB, FC, DB, SDB, SFB, SFC) and a small FAT file system that the CPU uses to manage the card. Work memory is the RAM the CPU executes from and is cleared on power-down unless battery or Energy Storage (ES) backup is present. Retentive memory holds a defined subset of bit memory, timers, counters, and DB bits that survive power cycle.

Engineer field note: the MMC is therefore the only place a S7-300 reliably stores user code. A CPU without an inserted MMC and without a battery cannot retain its program past a power cycle. Always treat the MMC as the canonical project artefact, not the CPU.

2. MMC Capacity Limits by CPU Family

Maximum MMC size is a function of the CPU firmware and the STEP 7 / TIA Portal version used to format the card. The 6ES7953-8xxx family of 5 V SIMATIC Micro Memory Cards is the standard media; a small number of newer S7-300 CPUs (CPU 31xT, 317-2 PN/DP, 319-3 PN/DP with newer firmware) also accept the larger 6ES7954-8xxx SD-style cards. Always cross-check the MLFB of the CPU against the current Siemens support entry before specifying a card size.

CPU Family Example MLFB Max MMC (V5.x) Max MMC (TIA) Notes
CPU 312 6ES7312-1AE14-0AB0 8 MB 8 MB Smallest MMC size supported: 64 KB
CPU 313C / 313C-2 6ES7313-5BF03-0AB0 8 MB 8 MB Compact CPU with onboard I/O
CPU 314 / 314C-2 6ES7314-1AG14-0AB0 8 MB 8 MB Typical plant-floor CPU
CPU 315-2 DP / 315-2 PN/DP 6ES7315-2EH14-0AB0 8 MB 8 MB Most common in skidded equipment
CPU 317-2 DP / 317-2 PN/DP 6ES7317-2EK14-0AB0 8 MB 8 MB Larger work memory, supports bigger user program
CPU 319-3 PN/DP 6ES7319-3EL01-0AB0 8 MB (V5.5+) 8 MB Largest S7-300 CPU; multi-port networking
CPU 31xT (Technology) 6ES7315-6TH13-0AB0 8 MB 8 MB Motion-capable; same MMC rules

For STEP 7 V5.x the practical upper bound for the project archive (not for the runtime blocks) is dictated by the FAT16 partition the CPU creates. Card sizes of 16 MB, 32 MB, 64 MB and 256 MB exist in the 6ES7953-8 family but only specific firmware revisions on certain CPUs recognise the full size; an oversized card may be accepted but only part of its capacity will be visible to the CPU. The Siemens support entry 12319445 "Which memory cards can you use with a S7-300 CPU?" provides the authoritative MLFB / firmware matrix and should be consulted whenever a non-standard capacity is being considered.

For S7-300 projects the actual on-card size of the runtime blocks is rarely the limiting factor. A 1 MB MMC is sufficient for most non-PN applications; 4 MB covers the heavy SFCs plus a comfortable amount of project archive; 8 MB is the safe upper specification for any current CPU. If you need to store large amounts of recipe data, a custom DB, or the entire zipped project archive on the card, specify 4 MB or 8 MB by default.

3. What Can and Cannot Be Stored on the MMC

Two distinct use-cases for the MMC exist and they are routinely confused:

  1. Runtime load image. The compiled blocks that the CPU executes. This is the image STEP 7 creates when you select PLC → Download or PLC → Copy RAM to ROM.
  2. Project archive. A ZIP file written to the card that contains the full offline STEP 7 project, including symbol table, comments, source files, and HW Config. This is the artefact you would upload to a PG to restore the offline project.

The runtime load image is always present if the CPU is in RUN. The project archive is optional, must be created explicitly, and is the only thing on the card that can be used to recover the offline project with all annotations.

Artefact Stored in runtime load image? Stored in project archive? Notes
Compiled OB / FB / FC / DB blocks Yes Yes Always on the MMC during normal operation
Block comments (header, network, symbol) No Yes Stripped at download; only the archive retains them
Symbol table No Yes Symbols are a PG-side concept, not loaded to the CPU
STL / SCL / LAD / FBD source No Yes (if sources are part of the offline project) CPU never holds source text; only compiled code
HW Config / GSD data No (SDBs only) Yes Archive contains the engineering view; runtime contains only SDBs
Recipes, logs, custom data DBs Yes (inside DB contents) Yes (default values only) Live values are runtime; default values come from archive

Two practical consequences follow directly from the table:

  • If you read a block online (e.g. via PLC → Upload Station to PG) the block arrives in the PG without comments and without a symbol table. The block is functionally identical to the original but is essentially undocumented.
  • If the project archive is on the MMC you can restore the full offline project, including comments, symbols, and sources, simply by opening the MMC in the PG. This is the recommended path for handing a system over to a new maintenance team.
Engineer field note: a CPU running with no project archive on the MMC can be edited, but you cannot retroactively recover the comments, symbols, or sources that were stripped at download. Plan the archive workflow at the end of every FAT and every SAT, not at handover.

4. Archiving a STEP 7 Project to MMC

Writing the project archive to the MMC is one operation in STEP 7 V5.x. The MMC may be in the CPU (online, over MPI/PROFIBUS/PROFINET) or inserted directly into the PG's external prommer. The direct path is faster and is preferred for new card provisioning.

4.1 Procedure (STEP 7 V5.x, MMC in CPU)

  1. Open the project in SIMATIC Manager.
  2. Select the S7 program or the project root, depending on whether you want the archive at program or at project level. Program-level archives are typical for controller-specific backups.
  3. Choose File → S7 Memory Card → Open. SIMATIC Manager will prompt for the target MMC. If the target is reached online, the dialog Select S7 Memory Card will list all reachable CPUs; if reached offline, the dialog will display the inserted external prommer.
  4. From the open MMC window, drag the program blocks folder onto the card, or use PLC → Save to Memory Card. STEP 7 will create a *.zip file inside the S7_PROG directory of the card containing the entire project.
  5. When finished, choose File → S7 Memory Card → Close to flush and dismount.

4.2 Procedure (STEP 7 V5.x, MMC in PG prommer)

  1. Insert the MMC into the S7 prommer (e.g. S7 USB prommer, 6ES7792-0AA00-0XA0). Windows assigns a drive letter or shows the prommer in the S7 prommer explorer.
  2. In SIMATIC Manager choose File → S7 Memory Card → Open and select the prommer target.
  3. Drag the project into the card. The File → S7 Memory Card → Save action will produce a SIMATIC.S7S directory layout suitable for the CPU.
  4. Close the prommer. Physically eject the card.

4.3 Procedure (TIA Portal)

The TIA Portal V13+ workflow is functionally identical but the menus are different. TIA writes a *.zip archive at the card root. Use Project → Memory card file → Add from the project tree, then Project → Memory card file → Write to memory card. TIA does not maintain a S7_PROG directory on the card; archives are flat *.zip files.

4.4 Estimating Archive Size

Use File → S7 Memory Card → Estimate in STEP 7 V5.x to obtain a size estimate before committing. The estimate accounts for blocks, sources, comments, and the symbol table. The Siemens support entry 22016778 "S7-300: How can I find out the size of the MMC so I can store my whole STEP 7 project on it?" documents the estimation procedure and the card-size selection rules.

5. Storing a Read-Protected Project on MMC

STEP 7 supports know-how protection at the block level (S7-300 only; S7-400 supports CPU-wide protection) and the project archive can be additionally password-protected so that opening the MMC in another PG does not reveal the source. The block-level protection is applied in the block properties dialog of the F-block, with a password and a CPU binding option. Once the protected blocks are loaded to the CPU the plaintext source is no longer available; only the compiled code is on the card.

For the project archive, choose File → S7 Memory Card → Save As in STEP 7 V5.x with the option Read-protected on memory card. The resulting ZIP can only be opened in a PG that knows the password. The Siemens support entry 15364459 "How can you save a STEP 7 project as read-protected on an MMC in an S7-300 CPU?" documents this in detail.

Warning: password protection of the project archive does not protect the runtime blocks on the card. A user with a programming cable can still upload the unprotected blocks from the CPU. Use block-level know-how protection (with CPU binding where licensing allows) for protecting intellectual property, not the archive password.

6. Restoring a Project from MMC to PG/PC

Recovery is the inverse of the archive procedure. With the MMC installed in the CPU, choose File → S7 Memory Card → Open in SIMATIC Manager and select the online CPU. The card contents appear in a Windows-explorer-style window. Double-click the *.zip archive; STEP 7 prompts for a target directory and extracts the full project, including sources, comments, and symbol table. The Siemens support entry 21738889 "How can you load projects to a memory card and back again to a PG/PC?" is the primary reference for this workflow.

If the MMC is in the external prommer the same File → S7 Memory Card → Open path works; the prommer is selected from the list of available targets. After extraction, archive any subsequent edits with the procedure in section 4 to keep the card and the PG in sync.

7. I/O List Recovery Without Source Documentation

7.1 Step 1: Recover the HW Config from the Online CPU

  1. Connect to the CPU online.
  2. Open HW Config and choose PLC → Upload Station to PG. STEP 7 reads the system data blocks (SDBs) and reconstructs the rack, modules, and addresses. Confirm the rack layout against the physical installation: module order, slot numbers, and order numbers must match the backplane. Mismatches usually indicate an unused slot or a reserved module.
  3. Save the reconstructed HW Config as the new offline project baseline.

7.2 Step 2: Upload the Block Bodies

  1. In SIMATIC Manager, with the online window open, select the Blocks folder.
  2. Choose PLC → Upload Station to PG. All blocks present in the CPU are uploaded to the offline project. The blocks arrive without comments and without symbol references; addresses appear as raw I, Q, M, DB references.
  3. Open each block and review the network titles and network comments. Although comments are stripped at download, some engineering teams embed their I/O descriptions directly in the network title; if the network was titled "Start PB_101" you have a starting point for the symbol table.

7.3 Step 3: Generate the Cross-Reference

  1. With the uploaded blocks open in the offline project, choose Options → Reference Data → Generate.
  2. Open Options → Reference Data → Display and select the Cross-references view. The cross-reference lists every operand in every block, with the block and network in which it is used.
  3. Filter the cross-reference for input (I), output (Q), and peripheral (PIW / PQW) addresses. The result is a complete I/O usage table. The list includes addresses that are used in the program but may not be wired, and addresses that are wired but never referenced; both categories need to be reconciled against the field wiring.

7.4 Step 4: Use the Program Structure (S7 Program, Block Hierarchy)

If the original program used instance DBs for I/O mapping (a common pattern in S7-300), the structure view shows the parent FB and the instance DB with its static variables. The static variable names are stripped at download but the offsets inside the DB are intact. A U I 0.0 in the body of FB100 is the same as the first bit of the input area; if FB100 is called from OB1 the instance DB will reflect the structure even if its name is DB100.

7.5 Step 5: Cross-Check with the Watch Table

  1. Open an empty watch table (PLC → Monitor/Modify) and add every input and output address from the cross-reference, one per row.
  2. Go online. Force each output and observe the field device. For inputs, operate the field device and observe the watch table.
  3. Record the function of each address in a comment column. This is the empirical I/O list that supersedes any reconstruction guess.

7.6 Step 6: Reconstruct the Symbol Table

With the empirical I/O list and the original wiring (where available) populate the STEP 7 symbol table. Naming convention is a project choice but the symbol table must include absolute address, symbolic name, and data type. The reconstructed symbol table is then the basis for re-documenting the program.

Engineer field note: a reconstructed offline project is functionally equivalent to the running CPU. It is not a 1:1 byte-for-byte match of the original, because the SDB timestamps, the diagnostic buffer entries, and the PG/PC password metadata are not preserved. Do not use the reconstructed offline project as a long-term archival record. The MMC with the original project archive remains the canonical artefact.

8. Reconstructing the Symbol Table

The symbol table is the most important deliverable when the source is lost. Build it in three layers.

Layer Source Quality
Layer 1: addresses from cross-reference Reference data Complete and authoritative for what the program uses
Layer 2: physical function Watch table empirical tests + P&ID Determines whether an I is a limit switch, pushbutton, or sensor
Layer 3: functional role Operating manual, process narrative, I/O list fragments Maps the I/O to the process step (e.g. I 0.0 = Reactor TK-101 level switch LSH-101)

Adopt the ISA-5.1 tag-naming convention where the plant standard allows; if no plant standard exists, use the same mnemonic structure as the field instruments to keep P&ID and PLC documentation aligned. The reconstructed symbol table should be checked into the engineering vault with a clear "RECOVERED" watermark to prevent confusion with a vendor-issued source.

9. Verification and Validation

Before considering a recovered project usable, perform a structured verification pass.

  1. Block-by-block comparison. With the recovered offline project open, connect to the CPU and choose PLC → Compare Blocks. STEP 7 lists online/offline deltas. Every delta must be resolved either by re-downloading the offline block or by re-uploading the online block. The end state must be a 100% match.
  2. Cross-reference consistency. Re-generate reference data and verify that the operand list matches the empirical I/O list from the watch table. Any address present in one but not the other is either unused (acceptable) or a missing instrument (must be investigated).
  3. CPU diagnostics. Open PLC → Diagnostic Buffer and clear it. Operate the system through a normal cycle. Re-read the diagnostic buffer; entries that repeat (e.g. I/O access error, rack fault) indicate wiring or address problems that the reconstructed project may have inherited from a slightly different runtime version.
  4. SF / BF indicators. With the system healthy, no LED other than RUN and DC 5V should be lit. SF, BF1, BF2 all clear, and the diagnostic buffer is empty. Document this as the recovery baseline.
  5. Project archive. Once the offline project matches the CPU, archive it to a fresh MMC using the procedure in section 4. Confirm the archive can be opened on a separate PG. The recovery is now complete.

10. Troubleshooting Matrix

Symptom Probable cause Resolution
CPU reports "Memory card not inserted" on power up MMC unseated or wrong orientation Power down, reseat card with label facing the eject mechanism; re-power
CPU reports "Memory card error" / SF LED on Card formatted with foreign file system or corrupted Reformat the card with STEP 7 (File → S7 Memory Card → Format); reload from PG
Online Upload Station to PG is greyed out Password-protected blocks or no PG password Enter the CPU password via PLC → Access Rights; without it, block upload is impossible
Cross-reference shows addresses not on the rack Address is symbolic or used via PIW/PQW on a non-installed module Check HW Config for module assignment; unused addresses indicate dead-code or future provisions
STEP 7 reports "insufficient memory on card" Project archive larger than the visible card size Estimate size with File → S7 Memory Card → Estimate; replace card with next size up to a max of 8 MB
Project archive on MMC cannot be opened in another PG Read-protected archive with forgotten password There is no recovery path. The password must be kept in a secure key-vault; the support entry for read-protected archives is 15364459
CPU runs with a card but PG reports "no online connection" Interface (MPI/PROFIBUS/PROFINET) misconfigured or wrong PG/PC interface selected Verify the PG/PC interface in Set PG/PC Interface; check the cable pinout (use a Siemens PC adapter or 6ES7972-0CB20)

11. Related Siemens Industry Online Support Entries

  • Entry 12319445 — Which memory cards can be used with an S7-300 CPU?
  • Entry 21738889 — How can you load projects to a memory card and back again to a PG/PC?
  • Entry 22016778 — S7-300: How can I find out the size of the MMC so I can store my whole STEP 7 project on it?
  • Entry 22266353 — How can you also store other files that belong to the project or plant on the MC/MMC?
  • Entry 15364459 — How can you save a STEP 7 project as read-protected on an MMC in an S7-300 CPU?

FAQ

What is the maximum MMC size for a S7-300 CPU?

8 MB is the maximum MMC size supported across the entire S7-300 CPU family using the 6ES7953-8xxx 5 V SIMATIC Micro Memory Card. STEP 7 V5.x and TIA Portal will accept larger cards on newer firmware revisions, but only 8 MB of capacity is exposed to the CPU. Specify 4 MB or 8 MB as a default for new projects.

Can the entire offline STEP 7 project, including comments, symbols, and sources, be saved to the MMC?

Yes — but only as a project archive (a ZIP file on the card), not as the runtime load image. Use File → S7 Memory Card → Open in SIMATIC Manager and drag the project onto the card; STEP 7 writes a single ZIP that contains the symbol table, comments, source files, and HW Config. The runtime load image alone cannot store any of these.

How do I recover an I/O list from a CPU that is running but has no offline project?

Upload the HW Config (PLC → Upload Station to PG in HW Config), upload the blocks (PLC → Upload Station to PG in SIMATIC Manager), generate reference data (Options → Reference Data → Generate), and filter the cross-reference for I, Q, PIW, and PQW addresses. Verify the list with a watch table against the field wiring before treating it as authoritative.

Why are my uploaded blocks missing comments?

Comments are stripped at the download step and are not part of the runtime image. The CPU only stores compiled code, not source text. To restore comments, symbols, and source files, the project archive must be opened from the MMC, not uploaded from the CPU.

Can a read-protected project archive on an MMC be opened without the password?

No. Read protection on the project archive is enforced by STEP 7 at open time; without the password the archive is not decryptable. Keep the password in a controlled key-vault. Note that the read-protection on the archive does not protect the runtime blocks on the card; use block-level know-how protection for that.

Back to blog