How to Copy S7-400 CPU Program to FEPROM Memory Card

David Krause12 min read
S7-400SiemensTutorial / 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: S7-400 Memory Architecture and Flash Card Operation

The Siemens SIMATIC S7-400 CPU 414-3 (order number 6ES7 414-3EM05-0AB0) is a mid-range controller in the S7-400 family that uses a plug-in memory card as its load memory. The memory card slot is located on the front of the CPU behind a hinged door. Two card types are accepted:

  • FEPROM (Flash EPROM) – retains its contents indefinitely without a backup battery. This is the card type most engineers refer to as the "flash card."
  • RAM card – volatile; requires the CPU backup battery to retain its contents across power cycles.

Writing a project to a FEPROM card is a write-once / many-read operation: every cell can be erased and re-flashed, but the entire card is rewritten in a single operation. When the operator asks "how to copy the program from the CPU to the flash card," the answer depends on whether the project currently lives in the integrated work memory of the CPU (online) or in an offline STEP 7 project on the engineering station. This article documents both flows against the CPU 414-3 PN/DP hardware.

Hardware rule: The S7-400 CPU must be in STOP for any operation that writes or erases a FEPROM card. The CPU will not allow a flash erase while it is in RUN, and the engineering software enforces the STOP state before issuing the write command.
STEP 7 Project(offline .s7p / TIA) CPU Work Memory(volatile, integrated) FEPROM Card(load memory, flash) Download Copy RAM to ROM Read from card S7-400 load-memory write paths (CPU 414-3)

Prerequisites

  1. CPU in STOP. Switch the CPU to STOP using the mode selector on the front panel, or right-click the CPU in STEP 7 and select PLC > Stop. The STOP LED must be solid amber.
  2. Correct card type. Insert a Siemens FEPROM card with sufficient free capacity. The card must be of the FEPROM family (article numbers beginning 6ES7 952-...). RAM cards and FEPROM cards are not interchangeable for write operations.
  3. STEP 7 programming tool installed. Either STEP 7 V5.7 (or older V5.x) with the S7-400 optional package, or TIA Portal V15 or later with the S7-400 CPU 414-3 HSP (Hardware Support Package). The procedure is fundamentally the same; the menu paths differ.
  4. Online connection. MPI, PROFIBUS, PROFINET, or Ethernet routing from the PC to the CPU. The CPU 414-3EM05-0AB0 exposes an MPI/DP interface (X1) and a PROFINET interface (X5) on the front.
  5. Empty or erasable card. If the FEPROM card already contains a project, the card will be erased and rewritten. Confirm the card contents are not required before proceeding.
Important: There is no way to write the program to a S7-400 memory card from the CPU itself. The "copy RAM to ROM" function is initiated by STEP 7 over the online connection; the CPU then writes the contents of its work memory to the FEPROM card under software control. A standalone PLC cannot perform this write without PC intervention.

Memory Card Types and Order Numbers

The S7-400 accepts 5 V memory cards that are physically keyed and electrically distinct. Mixing a RAM card into a FEPROM slot (or vice versa) will not damage the hardware, but the CPU will reject the card and signal an error.

Card Type Siemens Order Number (typical) Capacity Battery Required? Use Case
FEPROM 6ES7 952-1AH00-0AA0 64 KB No Small projects, archive
FEPROM 6ES7 952-1AK00-0AA0 256 KB No Typical mid-size S7-400
FEPROM 6ES7 952-1AL00-0AA0 1 MB No Larger projects with HMI tags
FEPROM 6ES7 952-1AM00-0AA0 2 MB No Multi-CPU / S7-400H projects
FEPROM 6ES7 952-1AP00-0AA0 4 MB No Maximum S7-400 load memory
RAM 6ES7 952-0AH00-0AA0 64 KB Yes Frequent online changes
RAM 6ES7 952-0AK00-0AA0 256 KB Yes Test, recipe data on card

The CPU 414-3 has 4 MB of integrated work memory (split between code and data) and accepts FEPROM load memory up to 4 MB. Selecting a card that is too small for the project will cause the download to abort with a load-memory overflow error.

Procedure A: "Copy RAM to ROM" via STEP 7 V5.x (Recommended)

The Copy RAM to ROM function copies the current online program in the CPU work memory to the FEPROM card installed in the CPU. The CPU does not need to be physically accessed beyond having the card already seated in its slot. The CPU must be in STOP; STEP 7 will prompt for the mode change if the CPU is still in RUN.

Step-by-step

  1. Connect the engineering station to the CPU 414-3 over MPI, PROFIBUS, or PROFINET. Open SIMATIC Manager.
  2. Open the offline project that matches the station, or open the project in the S7 Program directory without an online project.
  3. Go online: PLC > "Connect to Target System" > Online. The "Online" view should populate with the actual station configuration.
  4. Set the CPU to STOP: click the toolbar STOP button or choose PLC > Stop. Confirm the prompt; the CPU STOP LED illuminates.
  5. Choose PLC > Copy RAM to ROM... from the menu bar.
  6. A progress dialog appears; the CPU erases the FEPROM card, then writes the entire contents of work memory. This typically takes 30-90 seconds for a 1 MB project, longer for fully loaded S7-400H systems.
  7. When the dialog closes with no error, the FEPROM card now mirrors the work memory of the CPU.
  8. Power-cycle the CPU (or perform a MRES reset) to verify that the program re-loads from the FEPROM card. Place the mode selector in MRES for 3-4 seconds to clear work memory; on the next power-up, the CPU must rebuild work memory from the card.
Verification gate: After step 8, the diagnostic buffer (read with PLC > Diagnostic/Setting > Diagnostic Buffer) should show an entry of class "Start-up" with the FEPROM card as the load source. If the diagnostic buffer instead shows "Work memory empty" or a load-memory error, the FEPROM card write was not successful.

Procedure B: "Download to Memory Card" via STEP 7 V5.x

This method writes a project directly from the engineering station to the FEPROM card without first downloading it to the CPU. It is the preferred method when commissioning a fresh CPU or when the existing project on the engineering station is the master copy.

  1. Open the offline project in SIMATIC Manager.
  2. Insert a FEPROM card into the S7-400 CPU 414-3. Close the front cover.
  3. Set the CPU to STOP via the mode selector.
  4. In SIMATIC Manager, right-click the S7 Program object in the offline project tree.
  5. Choose PLC > Download to Memory Card. A submenu asks whether to include system data.
  6. STEP 7 transfers the project directly into the FEPROM card. The card is first erased, then flashed. The CPU need not be in online connection for this operation, but the CPU must be present on the programming cable to be recognized.
  7. After completion, remove the card only if you need to mount it in another CPU. To keep the program in this CPU, simply power-cycle it and the project will load from the card.

Procedure C: TIA Portal Equivalent

TIA Portal V15 and later support S7-400 CPUs via the SIMATIC S7-400 optional HSP. The portal exposes the same logical operations with a different menu path.

  1. In the project tree, expand the S7-400 station and select the CPU 414-3 device.
  2. From the Online menu, choose Online & Diagnostics. Wait for the portal to establish an online connection.
  3. In the Online & Diagnostics toolbar, click Go online, then choose Stop from the CPU operating-mode selector.
  4. Right-click the CPU in the project tree and select Download to device > Software (all) with the option to write to load memory (FEPROM).
  5. In the download preview dialog, check the box labeled Consistent download to memory card (RAM to ROM) or equivalent. Confirm.
  6. The portal reports progress; the FEPROM card is rewritten. On completion, the project on the FEPROM matches the project on the engineering station.
TIA quirk: TIA Portal V16 and earlier may treat the FEPROM card as load memory in the device configuration. Set the card type in the CPU properties (Properties > Memory) to FEPROM rather than RAM; otherwise the portal will refuse the RAM-to-ROM operation.

Procedure D: Manual Card Swap Method

This is the less common path described in older Siemens support documents. It is used when the engineering station cannot connect online, but the operator has a known-good STEP 7 project on a separate PC. The card swap sequence is:

  1. Set the CPU to STOP using the mode selector on the front panel.
  2. Open the front cover and pull the memory card straight out. The CPU STOP LED remains lit; the SF (system fault) LED may illuminate because the load memory is missing.
  3. Insert the empty FEPROM card. The CPU detects the new card.
  4. Power-cycle the CPU. With the new card, the CPU will have no project to load; work memory remains empty, and the CPU stays in STOP with SF lit.
  5. Connect STEP 7 online, perform Download to Memory Card as in Procedure B, then MRES the CPU and power-cycle again to confirm the program loads.

The original Siemens support entry that documents this sequence is the S7-400 CPU manual chapter 2.6 "Use of the Memory Cards," available from the Siemens Industry Online Support entry 53385241. A second Siemens KB article, entry 23670531, walks through writing the program to the card with screenshots from STEP 7 V5.x.

Memory Card Handling and Insertion Rules

  • Insert the card with the label side up; the keyed slot only accepts the card one way. Apply firm, even pressure until the ejector button on the card slot pops out.
  • Do not remove the FEPROM card while the CPU is in RUN. The write cycle is atomic, but the card-erase voltage and CPU state machine assume STOP.
  • If the FEPROM card is removed while the CPU is in RUN, the CPU will switch to STOP and signal a load-memory error in the diagnostic buffer.
  • FEPROM cards have a finite write endurance of approximately 100,000 erase cycles per sector. Routine project updates are well within that limit, but a test bed that flashes the card hundreds of times per day should use RAM cards instead.
  • Static-sensitive devices: store cards in their original antistatic case. The metal contact strip on the FEPROM card is the most common failure point after finger contamination.

Verification After the Copy Operation

  1. Power down the CPU.
  2. Wait 5 seconds.
  3. Power up the CPU. Watch the startup LED sequence: STOP (amber) → RUN (green) with no SF (red) activity.
  4. Open STEP 7 online and read the diagnostic buffer. Confirm a startup entry citing the FEPROM card as the source.
  5. Read the CPU identifier (online > PLC > Module Information > General). The "Load memory" field must show the card capacity, and "Used" must be greater than zero.
  6. Compare the project timestamp in STEP 7 to the timestamp printed on the diagnostic buffer entry to confirm the version copied is the intended one.

Troubleshooting Matrix

Symptom Likely Cause Corrective Action
STEP 7 reports "Card type not supported" RAM card installed, or card from a different S7 family (e.g., S7-300 MMC) Insert a 5 V FEPROM card from the 6ES7 952-1xxx order number family
Copy RAM to ROM aborts with "Insufficient load memory" FEPROM card capacity smaller than project size Use a larger FEPROM card (1 MB, 2 MB, or 4 MB)
CPU stays in STOP with SF LED on after copy Card write did not complete or card is defective Retry the write with a known-good FEPROM card; check contacts
Diagnostic buffer shows "Flash error" or "CRC error" Card contacts oxidized or card near end of life Reseat the card, clean contacts with isopropyl alcohol, replace card
STEP 7 menu "Copy RAM to ROM" is greyed out No online connection, or CPU is in RUN, or wrong project open Establish online connection, set CPU to STOP, reopen matching project
Program reverts to old version after power cycle MRES was not performed, or write was not committed Re-run Copy RAM to ROM, then MRES, then power cycle
Project downloaded to card is missing system data "Include system data" was unchecked Redownload with system data; check hardware configuration consistency

Comparison: Copy RAM to ROM vs. Download to Memory Card

Aspect Copy RAM to ROM Download to Memory Card
Source Online CPU work memory Offline STEP 7 project on PC
Typical use Committing online changes Commissioning new CPU, restore from backup
Requires online edits? No, but CPU must be online No, but PC must be online to the CPU slot
Effect on CPU CPU work memory unchanged CPU work memory unchanged, but card reflects PC project
Risk of mismatch Low (PC mirror of online) Higher if PC project and CPU project diverged
STEP 7 V5.x menu PLC > Copy RAM to ROM Right-click S7 Program > PLC > Download to Memory Card

Documentation References

Can the S7-400 CPU write to the FEPROM card by itself, without a PC?

No. The S7-400 CPU 414-3 has no operator panel for memory card operations. The "Copy RAM to ROM" command is initiated by STEP 7 over the online connection; the CPU performs the write under software control. A standalone CPU cannot write to its own FEPROM card.

Do I have to put the CPU in STOP before copying the program to the FEPROM card?

Yes. The CPU must be in STOP for any flash write or flash erase. STEP 7 will issue a prompt to switch to STOP if the CPU is in RUN. Manual card swaps also require STOP; pulling a card in RUN causes a load-memory error and the CPU drops to STOP.

What is the difference between a FEPROM card and a RAM card for the S7-400?

FEPROM cards (order numbers 6ES7 952-1Ax00-0AA0) retain their contents without a backup battery and are used as the load memory in production. RAM cards (6ES7 952-0Ax00-0AA0) require the CPU backup battery and are typically used in test beds or for recipes that change frequently. The CPU treats the two card types as electrically distinct and will reject the wrong one.

How long does a Copy RAM to ROM operation take on the CPU 414-3?

A 1 MB FEPROM card with a typical 600-800 KB project takes 30-90 seconds. A fully populated 4 MB card can take several minutes. The CPU erases the entire card before writing, so write time is dominated by the erase cycle rather than the project size.

Why does my CPU stay in STOP with the SF LED on after I copied the program?

The most common cause is that the FEPROM card was not fully written (interrupted by loss of online connection, card removal, or power loss) or the card itself is defective. Re-run Copy RAM to ROM, then perform an MRES reset, then power-cycle. If the SF LED persists, replace the FEPROM card with a known-good one.

Back to blog