S7-1200 Remanent Memory Errors Causing CPU Stop and IP Reset

David Krause13 min read
S7-1200SiemensTroubleshooting
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

Problem Overview

Field reports on the S7-1200 family (CPU firmware V2.x through V4.x) describe a recurring anomaly in which a CPU that previously ran cleanly transitions to the STOP state shortly after a restart or power cycle. Concurrent with this transition, the configured IP address disappears and the controller reverts to a default address such as 192.168.1.101 or, in some legacy projects, the topology-discovery range 192.168.0.0/24. The visible symptom reported by commissioning teams is: (a) PG/PC loses connection to the CPU, (b) the Web server is no longer accessible at the project IP, (c) HMI tags report "Partner not found" or "No connection", and (d) the diagnostic buffer shows one or more entries related to remanence / load memory / work memory.

The phenomenon is closely tied to the way the S7-1200 allocates remanence areas in Data Blocks (DB) and to the way the IP address is sourced from the project file versus from a SIMATIC Memory Card. This article collects the underlying mechanisms, the diagnostic event identifiers you should look for, and a deterministic recovery procedure using TIA Portal and the memory card workflow described in the SIMATIC S7-1200 Programmable Controller System Manual.

S7-1200 Memory Architecture and Remanence

Every S7-1200 CPU separates non-volatile and volatile storage into three logical regions. Understanding which region is involved is essential for the recovery.

Region Backing Store Volatility Content Size Indicative (CPU 1214C)
Load memory Internal flash + SIMATIC Memory Card Retain across POWER OFF Project, symbols, comments, recipe data 2 MB internal + card
Work memory RAM Lost on POWER OFF without remanence Code + DB copies executed at runtime 50 KB code / 50 KB data
Retain memory Non-volatile area inside the CPU Persists across POWER OFF Tags declared Retain / Persistent and DB bits with the remanence checkbox set 14 KB

Remanence is not automatic. For DBs, you must open the DB properties in TIA Portal and explicitly enable "Snapshot of the actual values of the data block after the restart of the CPU" via Optimized block access > Snapshot or via the classic "Set/reset of retentivity" column when Standard access is used. For tags (M, I, Q), the remanent range is configured under PLC tags > Default tag table > Remanence. Tags that fall outside that configured range revert to their initial values on restart and are not part of the persistent snapshot.

Note: A DB with retention enabled can still fail if its declared data structure changes between the project stored in load memory and the structure the CPU expects from retain memory. This is by far the most common root cause of the "stop + IP reset" symptom in the field.

Root Cause: Why the CPU Enters STOP and the IP Resets

The IP address of an S7-1200 is part of the project configuration stored in load memory. There are several IP source-of-truth paths:

  1. Project only — The IP is in the online project's Device configuration; it lives in the load memory image. If the CPU falls back to a clean factory state, it may recover the IP from internal flash.
  2. Memory card transfer — When the project was loaded to a SIMATIC Memory Card and the CPU booted from the card, the IP travels with the card; this is the path used in field reports (an OEM commissioned the followers with a card, then assigned IP 192.168.120.10x where x identifies the solar tracker).
  3. DCP / PROFINET discovery — The IP can be reassigned from a DCP-capable controller or from TIA Portal's Accessible nodes dialog.

When a remanence fault occurs, the S7-1200's firmware reaches an internal state where it cannot guarantee that the snapshot stored in retain memory matches the structure defined in the project. Three mechanisms can trigger this:

Mechanism Description Typical Field Trigger
Structure drift DB has been modified (new members, size changed, Type changed) without first clearing the retentive area. Engineer pushes a firmware-style update without doing a memory reset; user data from the old layout is read as the new layout.
Checksum failure Retain memory CRC does not validate. Most often after an incomplete write during brown-out or a firmware update. Power dip during write of the retain snapshot at restart; ESPE UPS on a poorly sized PSU on the plant.
Card project mismatch Memory card contains project revision N, internal retain contains snapshot built from revision N−1. OEM ships a card with a newer DB version than what was last deployed to the customer CPU.

In all three cases, the firmware's defensive action is to transition the CPU to STOP, log a diagnostic event, and require operator intervention. The IP address, which is part of the load memory image, may also be re-initialized to a default address because the operating system of the CPU has effectively dropped to a clean boot context. This is not a bug in the firmware — it is the documented behavior of the S7-1200 CPU Diagnostic Functions.

Diagnostic Events to Capture

Connect to the CPU with TIA Portal (Online > Go online > Accessible devices) and open Online & Diagnostics > Diagnostics buffer. Filter for the entries most relevant to remanence and STOP transitions:

Event ID (hex) Meaning Recommended Action
0x011A / 282 Memory reset requested due to retentive data defect. Perform MRES (memory reset) and re-download project.
0x012D / 301 Retentive data of an instance DB cannot be restored. Check DB revision against engineering project; clear retain area.
0x013E / 318 Checksum error in the retain memory area. Verify power quality; re-flash retain by clean restart.
0x0141 / 321 Loss of retain memory due to removed MC / internal error. Re-insert card, restart CPU.
0x015F / 351 STOP due to firmware-side error during startup. Look up preceding diagnostic entries for the actual cause.
0x2781 / 10113 PN IO: IP address parameterized / accepted. Confirms IP source — compare to project device configuration.
Some firmware revisions emit slightly different IDs. Cross-check against the S7-1200 System Manual section "Diagnostic Events of the CPU" for your specific firmware version (e.g., V4.5, V4.6, V4.7). Confirm the build under Online > Diagnostics > Module Information > Firmware.

Pre-conditions for Recovery

Before opening TIA Portal, gather the following so the recovery is a single contiguous operation. A half-finished recovery can leave the CPU in a less recoverable state.

  • The most recent project file from engineering (TIA Portal version aligned with the CPU's actual project; mismatch yields additional retentive errors).
  • A SIMATIC Memory Card of the same or larger size as the one originally used (SanDisk SDHC industrial-grade card recommended; consumer cards frequently cause 0x0152 / 338 faults).
  • The PG/PC Ethernet adapter configured with an IP in the same subnet as the CPU's known IP (192.168.120.10x) and a fallback in the discovery subnets 192.168.0.x and 192.168.1.x.
  • Physical access to the CPU's mode switch and to the SD slot.
  • Knowledge of whether the CPU is on PROFINET or simple TCP/IP communication — if PROFINET devices will also need to be recommissioned.

Step-by-Step Recovery Procedure (Software Path)

Use this procedure when the CPU is reachable (still showing in TIA Portal's Accessible nodes) but is in STOP.

  1. In TIA Portal, open the project that matches the on-card project revision. Do not modify the project until the CPU is back online at RUN.
  2. Right-click the device » Online & Diagnostics » confirm the diagnostic buffer entries described above and export the buffer to CSV.
  3. Navigate to Functions > Reset to factory settings. Acknowledge the warning. This erases the retentive area and the internal user program.
  4. Once reset, the CPU will boot with the default fallback IP. On modern firmware it is 192.168.1.101; on older revisions and on devices that lost the project-on-card it can surface as a 192.168.0.0-class address reachable only via Accessible nodes » Show All Accessible Nodes.
  5. From the TIA Portal project, compile the device (Compile > Software (rebuild all)) and Download to the CPU using the same IP that the CPU is currently exposing. TIA Portal will warn if the IPs differ; accept and proceed — the download reshapes the IP back into the project value.
  6. Start the CPU (Online > Start CPU or flip the mode switch to RUN). Watch the diagnostic buffer for any new event; none should appear if the download was clean.
  7. Verify the IP via Online & Diagnostics > Ethernet interface » IP addresses. The value should now match the project.

Step-by-Step Recovery Procedure (Memory Card Path)

Use this when the CPU is unreachable at its project IP, the memory card is the source of truth, or the card contents are needed to refresh a corrupted internal flash image — the scenario described in the original OEM commissioning workflow.

  1. Power down the CPU. Remove the memory card.
  2. In TIA Portal, open the originating project. Insert the card into a card reader. Use Project > Card Reader / USB Memory > Write to Memory Card. Select Transfer [Card → CPU] as the operation mode on the card's Properties so a power-on transfer is enforced.
  3. Confirm that the card's project IP matches the device IP you intend to write (192.168.120.10x). For fleet deployments where the IP changes per unit, do the edit on the engineering workstation, not directly on a card pulled from a follower.
  4. Insert the card into the CPU; power up. The CPU will transfer the project and IP from the card on first power-on. Watch the LED pattern: RDY and BF/FD flashing indicates transfer; a steady RDY indicates RUN.
  5. If the card carries the wrong project or wrong remanence layout, the CPU will go back to STOP and post a new remanence event. In that case repeat from step 1 and use Reset to factory settings before re-inserting.
  6. Confirm the IP at the operator panel or via HMI diagnostics. The IP is now 192.168.120.10x (matching the card's project) and not the original 192.168.1.101.
Critical safety note: Never swap a memory card between operational units without first verifying the remanent regions and the IP address configuration. Doing so is the largest single source of the STOP + IP reset symptom.

Verification Steps

The recovery is not complete until each line below is green.

Check Tool Expected Result
CPU state TIA Portal / LED RUN, no flashing ERROR.
IP address Online > Accessible nodes Matches Device configuration > Ethernet interface in project.
Retain values Online & Diagnostics > Watch table on the DB Values match the last-known-good snapshot.
Diagnostic buffer CSV export No new entries since recovery.
HMI connectivity HMI diagnostics screen Variables "Update" — no "Partner not found".
Web server Browser to project IP S7-1200 web page reachable.
Time sync NTP / CPU clock TOD (Time-of-Day) refreshed; critical if retain was lost.

Preventive Design Practices

  • Pin retention explicitly. Use the TIA Portal DB editor's Retain column for every member you want persistent. Avoid enabling entire DBs globally; partial retention reduces checksum risk because small retain regions are easier to validate.
  • Match DB revisions. Treat any DB change (Type, size, UDT instance configuration) as a code version increment that requires a Reset (warm restart) to clear the old retain snapshot before the next download. The Programming and Operating Manual confirms that the retain layout follows the project, not the runtime.
  • Industrial-grade memory cards only. Siemens validates specific card part numbers; catalog references include 6ES7 954-8LF03-0AA0 (4 GB) and 6ES7 954-8GB03-0AA0 (12 GB). Cards outside the validated list are a known cause of 0x0152 events.
  • Power quality. Protect retain write operations at restart with a UPS sized to ride through at least one full mains loss event; a hold-up below the CPU's minimum brown-out recovery window produces partial writes and subsequent CRC errors.
  • Version control on the IP. If the IP is parameterized from the card and there are multiple followers (e.g., solar tracker x), generate the card image from a TIA Portal script rather than editing in isolation. Build the IP for follower x as 192.168.120.100 + x and verify before writing the card.
  • Disable the retain properties between firmware updates. When upgrading from V4.2 to V4.6 or to a major V15.x line, temporarily disable retention, perform the load, then re-enable. This is documented in the S7-1200 System Manual firmware release notes.

Field-Proven Troubleshooting Matrix

Symptom First Check Action If Unresolved
CPU STOP after restart Diagnostic buffer event ID 0x011A / 0x012D / 0x013E MRES, re-download project from TIA Portal Recover via memory card transfer procedure
IP lost, reachable only at 192.168.1.101 Compare with project Device configuration Re-download to overwrite IP Reset to factory and re-flash
IP lost, unreachable at any IP Find CPU via Accessible nodes / DCP Assign IP from TIA Portal Re-image from memory card
Repeating reboot cycle Diagnostic buffer for power events Check PSU size, brown-out circuit Add UPS / replace PSU
Error only after DB change Project version vs. retain snapshot Clear retain, re-enable, restart Reset CPU to factory
Card not recognized Card part number / Siemens catalog Replace with validated card Format via TIA Portal and retry
Event ID 0x2781 keeps re-logging PROFINET topology mismatch Recompile device with correct GSD Reset PN name and IP

Edge Cases and Lessons from Field Reports

Case — Solar follower fleet: the controller IP 192.168.120.10x depends on the unit's tracker number. If the commissioning technician downloads the project from a different station's card, the IP becomes that station's x, masking itself as an "IP reset" while in fact it is a mistaken IP. Always validate the IP shown on the HMI against the project IP after each card transfer.

Case — Optimization pass without reset: changing a DB from Standard to Optimized block access reorganizes the retain layout. After such a change, the CPU will refuse to start with the old snapshot. The fix is Reset (warm restart) with retain retention disabled, restart, then download the updated DB. The Programming Manual lists this case explicitly as an unsupported transition with retain enabled.

Case — Firmware mismatch: a CPU on V4.4 firmware running a project compiled in TIA Portal V17 will stop immediately with a firmware diagnostic event. Roll the engineering version back or update the CPU firmware first. See the firmware compatibility matrix in the S7-1200 System Manual.

FAQ

Why does my S7-1200 lose its IP address after a remanent memory error?

The IP address is part of the project stored in the load memory. When the firmware detects an inconsistent retain snapshot, the CPU defensively enters STOP and may revert the load memory image to factory defaults, exposing the default 192.168.1.101. Re-downloading the project from TIA Portal restores both the retain layout and the configured IP.

Which TIA Portal setting controls whether a DB keeps its values across power-off?

Open the DB, choose Properties > Attributes; for optimized blocks enable Snapshot of the actual values, for standard blocks use the Set/reset of retentivity column. Each member you want to persist must be marked; partial retention is supported.

My CPU boots into STOP with diagnostic event 0x011A. What is the recovery sequence?

From TIA Portal run Online & Diagnostics > Functions > Reset to factory settings, then re-download the project. If the CPU is unreachable, transfer the project from a SIMATIC Memory Card written with TIA Portal's card reader.

Can I reuse a memory card between two S7-1200 CPUs with different IP addresses?

Only after re-flashing the card with the target unit's project. A card carries the originating IP; reusing it without rewriting causes the receiving CPU to adopt the donor IP and triggers a remanence fault if the retain layouts differ.

Which event ID indicates a checksum failure inside the retain memory of an S7-1200?

Event 0x013E (decimal 318) flags a retain memory checksum error. Investigate power quality during the prior restart and clear the retain area before the next cold start.

After a firmware update, the CPU still indicates an old IP. Is the IP stored in the firmware?

The IP is in the loaded project, not the firmware image. A firmware update without re-downloading the project keeps the old IP; re-download the project after a major firmware change to align IP, device name and retain layout.

Back to blog