S7-300 CPU 315-2DP CPU Replacement: MMC Transfer Procedure

David Krause11 min read
S7-300SiemensTutorial / How-to
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

Overview

The SIMATIC S7-300 CPU 315-2DP (order number 6ES7315-2AFxx-0AB0 or 6ES7315-2AHxx-0AB0 family) stores the entire STEP 7 user program, the system data, and the configurable parameters on the plug-in Micro Memory Card (MMC). Because the program and project data live on the MMC and not in internal flash, replacing the CPU with an identical (or firmware-compatible) part number is essentially a card-swap operation. No STEP 7 download to the new CPU is required, provided the MMC is the same physical card and the new CPU is healthy.

This procedure covers: identification of the existing CPU and MMC, pre-replacement backup, safe card insertion rules, the RAM-to-ROM function for persisting live actual values to the MMC, and post-replacement verification with STEP 7 V5.x or TIA Portal.

Critical safety notice: Removing or inserting the MMC while the CPU is in RUN or with power applied is not permitted on the S7-300 family. Power down the PS 307 power supply or place the CPU mode switch in STOP before touching the card slot. The MMC slot does not support hot-plug.

Prerequisites

  • Replacement CPU with identical or higher firmware than the original. Common order numbers:
    • 6ES7315-2AF03-0AB0 (FW ≤ 2.0.x)
    • 6ES7315-2AF04-0AB0
    • 6ES7315-2AH10-0AB0
    • 6ES7315-2AH14-0AB0 (latest 2-series variant)
  • PG/PC with STEP 7 V5.4 / V5.5 / V5.6 (classic) or TIA Portal V13 SP1 or higher, plus a PC adapter (USB-MPI or USB-PROFIBUS) or an Ethernet CP for online access.
  • Original MMC card already populated with the running project (preferred path).
  • A second, empty MMC of equal or larger capacity as a working spare (e.g., 6ES7953-8LG31-0AA0, 8 MB).
  • Documentation of the configured MPI/PROFIBUS node address and the IP address of the integrated PN/DP interface (where applicable).
  • Operator present, controlled shutdown authorized, process I/O in safe state.

CPU 315-2DP Hardware Identification

Before pulling the card, record the existing module’s identity. The order number is printed on the front label, but you can also read it from STEP 7 via PLC → Module Information → Order Number.

Field Where to read it Why it matters
Order number (MLFB) Front label or Module Information New CPU must match or be a valid successor
Firmware version Module Information → Firmware Firmware downgrade of an MMC is not supported
Serial number Module Information → Serial For asset register / warranty
Operating mode switch position Front bezel Document current state (RUN / RUN-P / STOP / MRES)
SF/BF/DC5V/FRCE LEDs Front bezel Pre-existing faults must be noted
MMC capacity & part number Sticker on card Spare card must be ≥ current capacity

The mode switch positions are standardized on every S7-300 CPU:

  • RUN – program execution, read-only from PG.
  • RUN-P – program execution, PG can write (default after power-up on a project-bearing MMC).
  • STOP – program halted, all outputs frozen to configured substitute values.
  • MRES – memory reset (used only for clearing a CPU; do not use it during a card swap).

MMC Types and Compatibility

The S7-300 family uses the proprietary Siemens MMC. They are not interchangeable with SD cards or PCMCIA cards of other platforms.

Order number Capacity Typical use
6ES7953-8LF30-0AA0 4 MB Small CPU 312/314 projects
6ES7953-8LG31-0AA0 8 MB CPU 315-2DP typical
6ES7953-8LJ31-0AA0 16 MB Large CPU 317/319 projects
6ES7953-8LL31-0AA0 32 MB Multi-project / large HMI tags
6ES7953-8LM32-0AA0 64 MB F-CPU with safety programs
6ES7953-8LP31-0AA0 128 MB Maximum supported
Firmware pairing rule: An MMC that was last written by STEP 7 with a target firmware newer than the new CPU’s firmware may refuse to start. Siemens documents the behavior under "MMC firmware > CPU firmware” in the Siemens FAQ — "RAM to ROM" in STEP 7 V5.x reference. If in doubt, the new CPU’s firmware must be ≥ the firmware of the CPU that last wrote the MMC.

Pre-Replacement: Backup the Project

  1. Connect the PG to the CPU via MPI/PROFIBUS or the PN port. In STEP 7 classic choose PLC → Upload Station to PG; in TIA Portal choose Online → Upload device as new station (hardware and software).
  2. Save the uploaded project under a date-stamped name (e.g., PlantA_CPU315_Backup_2024-05-17.zip). This is a defensive backup only; the new CPU will boot from the original MMC, not from this archive.
  3. Open PLC → Module Information → Diagnostic Buffer. Export the buffer to a text file — this becomes the baseline for post-swap fault comparison.
  4. Record CPU → Clear/Reset protection status. If the CPU is password-protected, capture the password out of band; the new CPU will prompt for it on first STOP→RUN transition if the project is encrypted.
  5. Note the IP / PROFIBUS address. The S7-300 stores network parameters with the project on the MMC, so they will travel with the card, but document them for sanity-checking after the swap.

Physical Swap Procedure

  1. Bring the controlled process to a safe state. Energize machine interlocks, coast drives, and post operator warning signs.
  2. Toggle the CPU mode switch to STOP. Verify the ST LED is solid yellow.
  3. Open the front cover of the old CPU. The MMC slot is at the top of the module behind a small ejector flap. Press the ejector gently and pull the card straight out. Do not bend; the contact edge is fragile.
  4. Visually inspect the card contacts for contamination, oxidation, or bent pins. If dirty, wipe with a dry, lint-free ESD cloth. Do not use solvents.
  5. With the new CPU unpowered (or in STOP), insert the MMC into the new CPU’s slot with the label facing outward. Push firmly until the ejector snaps flat.
  6. Apply power to the PS 307. The new CPU performs a startup test, reads the MMC, and transitions to RUN if the mode switch is on RUN or RUN-P and the project is consistent.
  7. Verify the SF (group error) and BF (bus fault) LEDs are off. A flashing BF on the first start is normal during DP slave enumeration.
Anti-static handling: The MMC is ESD-sensitive. Always grasp the card by its plastic body. If the plant floor is not ESD-safe, perform the swap at an ESD workstation.

RAM-to-ROM: Persisting Actual Values

The MMC stores two distinct sets of data:

  • Initial values — the snapshot at last download or last Copy RAM to ROM operation. These are the values that re-appear after a memory reset or power-up without remanence.
  • Actual values — the live runtime values currently in work memory, including any modifications made by the program (counters, setpoints, recipes, data block edits from the HMI).

If the plant has been running long enough that the actual values diverge from the initial values (e.g., tuned PID gains, set recipe data, runtime-modified tags), and you want those values to survive the next overall reset or the next cold start, you must copy them to the MMC before pulling the card.

Procedure in STEP 7 V5.x:

  1. PLC → Copy RAM to ROM…
  2. Confirm the dialog. The runtime-relevant data blocks are copied from main memory to the MMC. The progress is shown in the diagnostic buffer as event 0x4561 (HMI: "RAM to ROM completed").
  3. After completion, open any DB online and verify that the value in the Actual value column equals the value you expect. This column will now be the new Initial value after a memory reset.

Procedure in TIA Portal:

  1. Online → Snapshot of the actual values (TIA V15+), then Download to device with the option Download actual values to MMC.
  2. Alternatively, right-click the CPU → RAM to ROM.

Reference: the official Siemens FAQ "What should I watch out for with "RAM to ROM" in STEP 7 V5.x and in the TIA Portal?" covers the diagnostic buffer events, the requirement that the MMC be present, and the password implications.

Password caveat: RAM to ROM writes the encrypted form of any know-how-protected block to the MMC. If you later need to re-load the project, STEP 7 will prompt for the block password. Loss of the password means the block cannot be opened in the source — only executed by the CPU.

First Power-Up of the New CPU

  1. With the MMC seated and the mode switch in STOP, apply 24 V to the PS 307.
  2. Watch the LED sequence:
    • All LEDs on briefly → self-test.
    • SF red / BF red flash during DP startup is acceptable for the first 5–15 seconds while slaves are parameterized.
    • RUN green solid + ST yellow off = healthy RUN.
  3. Go online with STEP 7 / TIA Portal and confirm:
    • Operating mode: RUN
    • Cycle time: matches the original within ± 5 %
    • Diagnostic buffer: only the new POWER ON events and the expected RAM to ROM history; no SF events

If the CPU stays in STOP with SF lit, see the troubleshooting matrix below.

Verification Checklist

Check Expected result Pass criteria
Mode after power-up RUN (or RUN-P) Green RUN LED steady
SF LED Off No group error
BF LED Off after DP startup All slaves in data exchange
Diagnostic buffer Only POWER ON + expected events No stop codes or OB85 / OB86 events
MPI/PROFIBUS address Matches original Visible in Module Information
PG online access Establishes Can read blocks, force, monitor
HMI connectivity Restored Tags update
Process I/O Matches last known good state Outputs follow program, not frozen
Real-time clock Current time Set if drifted

Troubleshooting Matrix

Symptom Likely root cause Action
CPU stays in STOP, SF on, BF off, diagnostic buffer: "Module configuration error" Hardware configuration in MMC project refers to a module no longer present (or wrong order number) Compare HW Config with the actual rack; correct the slot or download a refreshed HW Config
CPU stays in STOP with SF: "Firmware version of the MMC is higher than the CPU firmware" MMC was written on newer firmware Replace the CPU with a unit whose firmware is ≥ the MMC’s expected firmware, or rewrite the MMC on older firmware
BF1 (PROFIBUS DP) flashing red, all slaves absent PROFIBUS connector not seated, termination wrong, or address clash with new CPU default Verify node address matches project; check bus termination; inspect cable
SF on, OB85 / OB86 events in buffer Distributed I/O slave not powered or addressing changed Power the slave; cross-check PROFIBUS addresses against project
All DBs show original initial values, not runtime values, after a STOP→RUN RAM to ROM was not performed before the swap Run RAM to ROM, then power-cycle. If data is already lost, re-tune manually
CPU requests password on STOP→RUN Project is know-how-protected; the MMC is encrypted Enter the correct password on the PG prompt; store password in a secure location
Online access denied: "Cannot establish connection to target" PG interface (MPI/PROFIBUS) does not match project bus parameters Set the PG/PC interface to PROFIBUS or MPI with the correct baud rate (default 1.5 Mbps for CPU 315-2DP)
MMC not detected, CPU requests MRES Card not fully inserted or wrong card type (non-Siemens) Re-seat the card, or replace with a genuine Siemens MMC of adequate size

Field-Proven Caveats

  • Pull the card last. Even if the documentation lets you swap power-on, technicians report far fewer fault entries when the card is moved with the CPU unpowered.
  • Don't confuse MMC with MC. The S7-300 uses MMC. The S7-400 uses MC (Memory Card). They are mechanically and electrically incompatible.
  • Real-time clock battery. The CPU 315-2DP has no integrated battery — the clock is buffered by a supercapacitor for a few days at most. After a multi-day outage expect the clock to be wrong; re-set via PLC → Set Time of Day or via NTP through a CP.
  • Remanence. The CPU 315-2DP supports remanent bit memory, counters, and timers backed by the MMC. Verify the remanence settings in HW Config → CPU properties → Retentive Memory; otherwise data will be lost on every power-down.
  • Keep the old CPU’s MMC as cold spare. Even after a successful swap, label and archive the old MMC; it is the fastest path to a fallback if the new unit is later diagnosed as defective.

FAQ

Do I have to download the STEP 7 project to the new S7-300 CPU 315-2DP after swapping the MMC?

No. The new CPU boots directly from the MMC. The card holds the entire user program, hardware configuration, and the connection data. A download is required only if you need to change the project.

Should I run RAM to ROM before pulling the MMC?

Yes, if the live actual values (tuned PID gains, setpoints, runtime-modified DBs) must survive a future overall reset. Without RAM to ROM, the CPU reverts to the initial values that were last downloaded. Use STEP 7 menu PLC → Copy RAM to ROM… or TIA Portal's RAM to ROM action, then verify in the diagnostic buffer.

Can the new CPU have a different firmware version than the old one?

Yes, as long as the new firmware is equal to or newer than the firmware that last wrote the MMC. A CPU whose firmware is older than the firmware recorded on the MMC will refuse to start, citing a "Firmware mismatch" in the diagnostic buffer.

Is it safe to insert the MMC while the CPU is powered?

No. Always power down the PS 307 or place the mode switch in STOP before touching the card. The MMC slot is not hot-pluggable, and the contacts can be damaged or corrupted by mid-insertion writes.

What happens if the new CPU asks for a password on first start?

The MMC is know-how-protected. The CPU will execute the program but the PG cannot open the protected blocks without the password. Enter the original password on the STEP 7 / TIA Portal prompt, then store it in a secure location; the password is required for any future re-load of the encrypted blocks.

Back to blog