Siemens S7 MMC Flash Program Transfer: Firmware Compatibility

David Krause12 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

1. Program Transfer Scenarios on SIMATIC S7 PLCs

MMC (Memory Micro Card) transfer is one of the fastest ways to deploy a STEP 7 or TIA Portal project to an S7-300, S7-400, S7-1200 or S7-1500 CPU. It avoids the Engineering Station (ES) download, removes the dependency on the project archive, and is the standard procedure when an identical spare CPU must take over a defective one with minimal downtime. Two field scenarios are critical:

  1. Identical CPU order number and identical firmware version – usually a transparent swap. Diagnostic buffer stays clean and user program executes without modification.
  2. Identical CPU order number but different firmware version – the swap physically works but the user program can execute differently. Symptoms include partial failure, modified timing behavior, and altered handling of asynchronous, motion control, or system-side instructions.
Engineering Rule: Treat every MMC transfer as a project migration, not a file copy. The card only stores the load image and the system data blocks. Anything outside that image – startup initial values, runtime-generated DBs, remanent flags – is at risk.

2. MMC vs. MCR / EPROM: Storage Architecture

The S7-300/400 generation stores the user program on the MMC (no longer EPROM or MCR modules after firmware 2.x on the 31x series). The SIMATIC S7-1200 and S7-1500 also load from an SD/MMC card. The relevant memory areas for a transfer are:

Memory Area Stored on MMC Retention After Power Cycle Editable From PG
Load memory (OB, FB, FC, DB, SDB) Yes Yes (flash) Yes (full download)
Work memory (executed code, runtime DB instances) No – copied at startup Volatile No
Retentive bit memory / retentive DB areas No Battery-backed or NVRAM (S7-1500) Yes (online)
System data blocks (SDB) – HW config, net config Yes Yes Yes (full download)
Forced variables (Force table) No Not retained across power-cycle for DB variables Yes (Force)

According to the SIMATIC S7-300 Automation System CPU 31xC and CPU 31x Operating Instructions, when the MMC is inserted and the CPU is powered, the load image is unpacked into work memory. The SDBs define the configured hardware topology. Any later online change to the hardware (inserting a module, modifying a slot) is written back to the MMC only if the project is downloaded or the user explicitly triggers a "Copy RAM to ROM" on S7-300, or "Download to device / Load to memory card" on TIA Portal.

3. Case A — Identical Hardware and Identical Firmware

This is the "transparent swap" path:

  1. Source CPU and target CPU share the same order number (e.g. 6ES7318-3EL01-0AB0).
  2. Source CPU and target CPU share the same firmware release (e.g. V2.8).
  3. The MMC is inserted into the target CPU without modification.

Result: the CPU boots, the SDB topology matches the wired hardware, the user program executes unchanged. The diagnostic buffer will show the expected startup OB100 events. No additional verification is required beyond a process-side observation cycle of one full production sequence.

This is the scenario described by the field report: two S7-319-3 PN/DP V2.8 controllers on line A and line C. When the line C CPU failed, the line A CPU was moved to line C with its line C MMC inserted and the line ran with no algorithm change.

4. Case B — Identical Order Number, Different Firmware

The same physical CPU can ship with multiple firmware releases. For example, the 6ES7318-3EL01-0AB0 is documented as supporting firmware V2.x, V3.x and later. STEP 7 online mode will show the firmware mismatch in the "PLC → Module Information" view, and TIA Portal will display the project vs. online target version in the diagnostic toolbar.

Symptoms that appear after this kind of MMC transfer:

  • OB1, OB35, OB82 all execute – no startup fault.
  • Diagnostic buffer is empty or contains only informational entries.
  • A subset of the user program behaves differently. The example from the source: 80 % of the line works, 20 % does not, and the failing area is not linked to a specific OB or FB number visible from the diagnostic buffer.

Three independent root causes contribute to this behaviour, and any combination of them can be present.

5. Root Cause 1 — Instruction Implementation Differences Across Firmware

Siemens releases firmware updates that change the implementation of high-level instructions while preserving the formal interface (the same FB / FC call signature, the same input/output pin names). The user program therefore still downloads successfully, but the internal timing, edge handling, or error reporting of the instruction can be different.

The field example: an S7-1511T fleet where eight machines ran on FW < 2.0 and four new machines shipped with FW > 2.0. The asynchronous instructions and the motion control instructions behaved differently. After recompilation and download the program still misbehaved; code optimisation was required to make it work on the newer firmware.

Mechanically, the migration impact is concentrated in:

Instruction Family Typical FW-Sensitive Behaviour
DPRD_DAT / DPWR_DAT Error byte position, busy-handling on PROFINET IO
Motion control FBs (S7-1500T) Axis command queue, jerk-limited profile calculation
Asynchronous RDREC / WRREC Status bits, multiple-instance handling
System FBs / SFCs (e.g. SFC51, SFB52) Diagnostic data layout, return value interpretation
Web server APIs, OPC UA server Method call handling on S7-1500
Diagnostic: Use the "Compare online/offline" view of the project to detect instruction-by-instruction signature changes. On TIA Portal, the instruction library version is embedded in the block signature. Mismatches show up as "Block differs in compilation date / interface signature".

6. Root Cause 2 — Data Block Initial Values

The single most common cause of a partial-failure scenario after an MMC transfer is the interaction between start values and actual values in data blocks. The behaviour differs by action:

Action Start Values Actual Values
PG → CPU download Overwritten from project Overwritten from project (unless only SDBs are downloaded)
CPU → PG upload (read from PLC) Overwritten by current actual values Copied as-is into the project
MMC → CPU transfer (different FW) Copied from MMC Set to start values on initial startup
MMC → CPU transfer (same FW) Copied from MMC Set to start values on initial startup
CPU → MMC copy back (without upload) Preserved as project Preserved as project

This is the behaviour the field report explicitly observed: an uploaded program had start values in every data block, even though the engineering project did not specify those values. The CPU had rewritten the start values with the current actual values at the moment of upload.

Therefore: never use an "uploaded to PG" program as the starting point for an MMC transfer. The DBs in such a project carry the runtime state as their initial values, which will overwrite the freshly-installed CPU's state on its first start.

If the original engineering project is lost, the safest path is to (a) decompile the program, (b) reset all DB start values to documented defaults, (c) verify with the commissioning engineer, and (d) compile and download through the PG — only then copy to MMC.

7. Root Cause 3 — Runtime-Created DBs and System Data Blocks

A second, less obvious cause is the runtime-generated DB family. Some FBs (and some Siemens library FBs, particularly on S7-1200/1500) instantiate DBs only on first call. The DB's actual content depends on the CPU's work memory state at the moment of instantiation. When the MMC is moved between two CPUs with different firmware, the ordering and the implicit initialisation of these DBs can be different.

Symptoms:

  • Blocks compiled and loaded without error.
  • A specific instance DB shows plausible-looking data but the values diverge from expectation.
  • No SF / BF LED. The CPU is in RUN with no diagnostic buffer entry.

Detection: use Online & Diagnostics → Blocks to compare the online instance DB timestamp and content with a known-good reference. For TIA Portal projects the helper view is Project tree → PLC → Program blocks → System blocks → Resources, looking at SDBs with high "Generated by" version.

Field fix: delete the affected instance DBs in RUN (using the small "delete" button in the online view, only available if the FB allows it), then trigger a warm restart so the FBs recreate the DBs from firmware-correct defaults.

8. Root Cause 4 — Forced Variables and Retentive Memory

Forcing is a PG-driven feature that overrides a tag's actual value while the CPU is in RUN. Two important properties:

  • Forced variables are not stored on the MMC. They live in the CPU work memory.
  • Forced DB variables are not retained across a power cycle. After power off → power on, forced DB tags revert to the value determined by the DB start value / initialisation logic. Forced I/O points and forced bit memory (M) tags behave differently – the I/O peripheral force persists while the bit memory force is also cleared on stop→start transitions in many firmware versions.
The field question "after turning off the power, the forced variables return to their original state?" is answered yes for DB variables on the S7-300/400/1200/1500. If a process was depending on a forced DB value to maintain a safe state, an MMC swap followed by a power cycle will silently lose that override.

Remediation:

  1. Document every active force in the Force table and store it with the project archive.
  2. After any MMC transfer, re-apply forces from the PG before re-enabling the line.
  3. Verify with the customer engineering team that "no force" is the intended steady state. If a force is part of the operating procedure, it must be migrated to a controlled set/reset logic in the user program.

9. Diagnostic Procedure Before and After MMC Transfer

The procedure below is the field-proven pattern for a safe MMC transfer. It applies to both S7-300/400 (STEP 7 V5.x) and S7-1200/1500 (TIA Portal) environments.

9.1 Pre-transfer (on the source CPU)

  1. Read the diagnostic buffer and export it as a CSV.
  2. Open the Force table, export it, and record every forced tag.
  3. In TIA Portal: Online → Back up → Online snapshot to save the actual state of the DBs.
  4. In STEP 7 V5.x: use PLC → Upload Station to PG only as a fallback; this will overwrite DB start values with actual values and is therefore unsafe to re-deploy.
  5. Document the firmware version of the source CPU via PLC → Module Information → Diagnostics (tab "General").
  6. Document the MMC card type (capacity and Siemens order number). MMCs are not interchangeable across all CPUs – a 6ES7953-1xx00-0AA0 MMC may not be accepted by every CPU family.

9.2 Transfer and first boot

  1. Power off the target CPU. Insert the MMC. Power on.
  2. Wait until the CPU reaches RUN. Note the SF/BF LED state.
  3. Connect the PG and read the diagnostic buffer. Expect OB100 entries referencing the new MMC as the source of the load image.
  4. Compare the CPU's reported firmware against the project's configured firmware. A mismatch is an information, not an error – but it requires the verification in step 9.3.

9.3 Verification on every program path

  1. Watch the OB35 (cyclic interrupt) execution time in Module Information → Time System. A spike in the OB35 runtime after a firmware change is a strong indicator of FW-sensitive instruction behaviour.
  2. Cycle through every operating mode of the line: manual, semi-automatic, automatic, service, recipe changeover.
  3. Compare each process variable against the reference line. Capture a 30-minute trend of every critical tag (flow, pressure, temperature, motor speed) using the Web server's "Watch tables" on S7-1500 or the WinCC tag logging on the HMI.
  4. Document every deviation. A deviation is either an instruction-level implementation difference (Root Cause 1), a DB start value issue (Root Cause 2), or a runtime DB instance issue (Root Cause 3).

10. Safe Commissioning Procedure After an MMC Transfer

For production lines that cannot be stopped for a full re-commissioning, the following minimal procedure reduces the risk of a partial failure:

  1. Build the engineering project for the source CPU from the PG archive (do not upload from the live CPU).
  2. For the new CPU with newer firmware, open the project in TIA Portal, change the device version to match the target firmware, and recompile. Note every block where the compiler reports an interface change or a deprecated instruction.
  3. For each reported block, review the runtime semantics. Update only the necessary blocks.
  4. Download the corrected project to the CPU in STOP. Then perform a warm restart to RUN.
  5. Verify the previous operator's manual override steps against the new build. Most partial failures reported in the field originate here: an override that worked because of the old DB initial value no longer works because the new DB initial value is different.

If the engineering project is unavailable, perform an upload as the absolute last resort and then immediately:

  • Reset every DB's start values to the documented defaults.
  • Compile the project (this re-applies the user-defined start values).
  • Download with "Reset output".

11. Verification Checklist and Field Test Plan

Item Check Pass Criterion
CPU diagnostic buffer SF/BF LED state, OB entries No SF, no BF, OB100 present, no unexpected OB82/OB86
Project vs. online firmware Compare versions in module info Either match or a documented intentional change
DB start values Compare DB start values vs. engineering project Match the engineering project; no "current state as start value" artefacts
Force table Re-apply from documented list All forces re-applied and acknowledged by operations
OB35 runtime Compare pre/post transfer Within ±15 % of pre-transfer value
Operating modes Manual, semi-auto, auto, service, recipe change All reachable and behaviour matches reference line
Retentive variables Power cycle test All critical retentive tags retain their values across power cycle
Process trend 30-minute reference trend vs. neighbouring line No deviation > the documented tolerance band
Safety: If the line serves a process where a partial failure creates a safety hazard (e.g. press line, furnace, extrusion line), reduce throughput to manual mode during the verification window and have the customer's safety officer present.

12. Frequently Asked Questions

Can an MMC be swapped between an S7-319-3PN/DP V2.8 and an S7-319-3PN/DP V3.2 without recompiling the project?

Physically yes. Functionally, expect differences in the runtime behaviour of motion control, asynchronous instruction handling and SDB evaluation. Plan a partial verification of every operating mode before resuming production at full speed.

Are forced DB variables retained across a power cycle after an MMC transfer?

No. Forced DB values live in work memory and are cleared on the next stop → start transition. Re-apply the force from the PG after the CPU is back in RUN. This applies to S7-300, S7-400, S7-1200 and S7-1500.

Why does an "uploaded to PG" program behave differently from the original project after an MMC transfer?

Uploading reads the current actual values and writes them back as the DB start values. The resulting project no longer represents the engineering intent and will overwrite the new CPU's DB state on the first start. Always rebuild from the engineering archive if possible.

Is it safer to transfer an S7-1200/1500 project via TIA Portal download than via MMC swap?

Yes, for any project where the source firmware and the target firmware differ. The PG download lets you recompile against the new instruction libraries, fix interface signatures and update the SDB topology. The MMC swap skips all of these checks.

How do I detect a runtime-generated DB that was incorrectly instantiated after a firmware migration?

Open Online & Diagnostics → Blocks and compare the online instance DB timestamp and content with a reference CPU running the original firmware. Mismatched actual values with empty diagnostic buffer is the fingerprint of a runtime-instantiated DB that needs to be deleted and recreated.

Back to blog