Resolving TIA Portal Software All Download Wiping Retentive Data

David Krause10 min read
SiemensTIA PortalTroubleshooting
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 Definition: Software (all) Download Erases Retentive Memory

When an engineer selects Online > Download to device > Software (all) in the Siemens TIA Portal, the entire user program — all blocks, PLC data types, PLC tags, hardware configuration, and runtime data — is overwritten on the target S7-1200 or S7-1500 CPU. Critically, this action resets every runtime value to its initial value, including all retentive variables. This behavior is identical to a power-on with memory reset and is not what most users expect from a routine program update.

The root cause is functional, not a defect: the "Software (all)" option is defined in the TIA Portal documentation as the most complete form of download, intended to bring the device to the same state as a freshly configured CPU. The CPU enters STOP, the entire Load memory is replaced, the Work memory is cleared, and the Retentive memory partition is rebuilt from the project's initial values.

Field Impact: Counters, production totals, recipe indices, hours-run meters, batch IDs, and any tag flagged with SET_RETAIN or contained in a DB marked as retentive will all be zeroed. Plan maintenance windows accordingly and always perform a backup before this download.

Affected TIA Portal Versions and Documentation

TIA Portal Version Documentation Coverage Manual Reference
V13 / V13 SP1 Mentions "all values reset" without explicit retentive callout STEP 7 Professional / Basic manual set
V14 / V14 SP1 Implicit in "Download to device" chapter; not always surfaced in tooltips STEP 7 Professional manual
V15 Behavior present, but the retentive-data warning is hard to locate or omitted STEP 7 Professional V15 manual
V15.1 and later Explicit warning added: "Be aware that this also applies to retentive values." STEP 7 Basic/Professional V15.1 and WinCC V15.1 system manual
V16, V17, V18, V19 Warning retained and expanded with snapshot guidance TIA Portal Help > Loading projects to the target system

The canonical Siemens phrasing from V15.1 onward reads:

Software (all): The PLC program including all blocks, PLC data types and PLC tags is downloaded to the target and all values are reset to their initial values. Be aware that this also applies to retentive values.

This passage appears in the TIA Portal help under General information on loading. For the current Siemens documentation portal, the equivalent reference is the TIA Portal online help at the official Siemens Industry Online Support portal, where searching for "Download to device — Software (all)" returns the relevant system manual chapter.

Why Software (all) Behaves This Way

Internally, "Software (all)" executes the following sequence on the CPU:

  1. Issues a STOP request to the CPU.
  2. Performs a memory reset (MRES) equivalent on the load and work memory.
  3. Re-flashes the entire user program from the engineering project.
  4. Initializes all data blocks from their declared initial values (the value columns in the DB editor).
  5. Rebuilds the retentive memory map using only the values declared as RETAIN or RETAIN_PERSISTENT in the project source.

Because the runtime values held in the retentive memory partition come from the live process — not from the project source — they are not part of the download payload and are lost. The download brings the CPU into the state defined by the offline project, not into the state the CPU was in at the moment of the request.

Comparison of TIA Portal Download Options

Download Option Program Code Hardware Config Non-Retentive Data Retentive Data Use Case
Software (all) Replaced Replaced Reset to initial Reset to initial Full re-flash after major change
Software (changes) Updated where changed Updated where changed Preserved unless new block Preserved Incremental edits during commissioning
Hardware configuration only Not modified Updated Preserved Preserved Adding/removing modules
Block (single) Selected block only Not modified Depends on block Preserved (untouched tags) Single FB/FC/DB correction

For most live systems, the safe choice is Software (changes), which performs a delta download and leaves retentive memory intact provided that no retentive tag's data type, name, or address has been changed.

Solution: Use the DB Snapshot Workflow

The recommended Siemens-supported recovery path before a "Software (all)" download is the DB Snapshot feature introduced in TIA Portal V14. A snapshot captures the current retentive values of one or more DBs into a binary file inside the project tree. Engineers can then restore those values after the download.

Prerequisites

  • TIA Portal V14 or later with the online connection active.
  • The PLC must be online and in RUN or STOP for snapshot capture.
  • The DB structure in the offline project must match the runtime DB (same tag names, types, and retentive attributes). Renaming, retyping, or reordering tags invalidates the snapshot.
  • Only DBs whose retentive attribute is Set in IDB or whose tags carry RETAIN / RETAIN_PERSISTENT need snapshots. Non-retentive DBs do not need backup.

Step-by-Step: Capture, Download, Restore

  1. In the project tree, expand Program blocks > System blocks > Program resources or the specific DB you wish to back up.
  2. Right-click the target DB and select Snapshot > Create snapshot of the data block.
  3. Confirm the snapshot file is stored under the DB element in the project tree (file icon changes).
  4. Optional: repeat for every retentive DB. Group them logically (e.g., recipe DBs, production DBs, counter DBs).
  5. Inspect the snapshot values to confirm they match expectations before continuing.
  6. Initiate the full download: right-click the CPU or the Program blocks folder > Download to device > Software (all).
  7. Do not start the PLC. Leave it in STOP to allow safe restoration.
  8. Right-click each backed-up DB and select Snapshot > Load snapshot of data block to target device.
  9. If a DB contains a mix of retentive and non-retentive tags, the snapshot will overwrite both. Verify tag-level attributes before restore or split the DB into two with explicit retentive flags.
  10. Confirm the restored values in the Monitor & force table.
  11. Switch the CPU to RUN and verify process state.

Verification Checklist After Restore

  • Open the online DB and compare tag-by-tag against pre-download values.
  • Check that counters, timers (IEC_TP, IEC_TON), and recipe pointers are at expected values.
  • Confirm the CPU diagnostic buffer shows no snapshot inconsistency errors.
  • If using RETAIN_PERSISTENT, the values survive a power cycle; verify by disconnecting power briefly (only on commissioning bench, not on a live process).

Alternative Recovery Without Snapshot

If a snapshot was not captured before the destructive download, recovery options are limited but still possible:

Method Coverage Limitation
Online backup via SIMATIC Automation Tool Full project + retentive memory Requires the backup to have been taken before the download
SD card / SIMATIC Memory Card offline update Transfers entire PLC image including retentive partition when used as transfer card Only available on S7-1500; S7-1200 cards are program-only
Reading the SD card on a stopped CPU Retentive values written to card on S7-1500 via WRIT_DBL in program Application must be programmed to do this explicitly
Recipe DBs persisted via HMI / OPC UA External retention Requires the application architecture to push values out before download

For S7-1500 systems, the most robust preventive measure is to enable automatic backup to SIMATIC memory card in the CPU properties under Card Operation / Backup. The card stores the entire project image and the retentive memory partition, allowing a clean restore if a destructive download occurs.

Configuration: Enabling Retentive Behavior on S7-1200/1500

Retentivity is configured per tag, per DB, and per memory area. Misconfiguration is a frequent cause of "unexpected" data loss even on incremental downloads.

For Instance DBs

  1. Open the DB in the TIA Portal editor.
  2. In the tag table, click the Retain column for each tag that should survive restart.
  3. Choose Non-retain, Retain, or Retain persistent (S7-1500 only).
  4. Persistent values additionally survive a memory reset (MRES), a "Reset to factory settings", and a card-based restore operation.

For Global Memory Bits, Counters, and Timers

ol>
  • Open PLC properties > Retentive memory areas.
  • Specify the starting byte and length for MB, MW, MD, and IEC counters/timers.
  • Note: only S7-1500 supports defining arbitrary retentive ranges; S7-1200 uses fixed ranges of MB0..MB8191 starting at configured byte.
  • For System Clock and Operating Hours

    The S7-1500 operating-hours counter and the system clock are inherently retentive and persist across STOP/RUN and across power cycle if the CPU has a battery or supercapacitor backed memory. They are, however, lost on "Software (all)" with subsequent cold restart, because the retentive memory map is rebuilt from project-declared values.

    Troubleshooting Matrix: Download Behavior Symptoms

    Symptom Likely Cause Remediation
    All values reset to zero after download "Software (all)" was used instead of "Software (changes)" Restore via snapshot or external backup; switch to "Software (changes)" for next iteration
    Only some tags reset Tags declared non-retentive in DB or new DB instance has not yet acquired retentive attribute Verify retain column; recompile and download again
    Snapshot file is missing or grayed out Offline/online DB structures differ (compiler adds optimization padding) Recompile both sides consistently; avoid tag renames between snapshot and restore
    Restored values are immediately overwritten by program Application logic initializes the DB on first scan / OB100 Add run-first-scan flag or remove startup OB100 initializers
    Persistent values still missing after restore CPU did not perform a cold restart — STOP/RUN alone does not re-read retentive partition Power cycle or trigger explicit MRES-equivalent path
    Download fails with "Target CPU is in RUN" CPU not stopped before download Manually STOP the CPU or configure auto-STOP in download dialog

    Preventive Engineering Practices

    Engineers running TIA Portal on production or near-production machines should treat "Software (all)" as a destructive maintenance action and wrap it in the following routine:

    1. Capture DB snapshots for every retentive DB.
    2. Trigger an external backup via SIMATIC Automation Tool or WinCC archive.
    3. Stop the process in a controlled manner; engage safety circuits.
    4. Document the pre-download state of critical tags in a CSV exported from the online DB.
    5. Perform the download with the CPU in STOP.
    6. Restore snapshots before transitioning to RUN.
    7. Verify the live process state tag-by-tag before resuming production.

    For projects that change often, prefer Software (changes) exclusively and only escalate to Software (all) when major structural changes (renaming tags, changing retentive attribute, switching CPU firmware) require a full re-flash. This single habit eliminates most real-world retentive-data-loss incidents.

    Compatibility Notes by Firmware

    CPU Family Firmware Range Snapshot Support RETAIN_PERSISTENT Support
    S7-1200 (CPU 1211..1215) V4.0 and later Yes (via TIA V14+) No
    S7-1200 (CPU 1217) V4.2 and later Yes No
    S7-1500 (CPU 1511..1518) V1.5 and later Yes Yes
    S7-1500 (CPU 1516 PRO, ET200SP CPU) V2.0 and later Yes Yes (with supercapacitor/backup)
    S7-1500R/H redundant V2.6 and later Yes Yes

    Earlier S7-1200 firmware (V3.x) does not support DB snapshots and requires manual read/write of retentive tags via the online watch table before and after the download.

    Frequently Asked Questions

    Does "Software (all)" reset M-bits and IEC timers/counters?

    Yes. All M, MB, MW, MD bytes declared retentive in the PLC properties are reset to zero, along with IEC counters and timers. Only non-volatile tags declared in the offline project survive, and only at their declared initial values.

    Can I download "Software (all)" without losing retentive values on S7-1500?

    No. "Software (all)" always rebuilds the retentive memory from the project's initial values. The only mitigation is to restore values afterward via DB Snapshot, an SD-card backup, or external persistence. The retentive attribute on tags determines what is preserved in the new map, not what is preserved across this download.

    Where is the retentive-data warning documented for TIA Portal?

    From V15.1 onward, the warning appears in the TIA Portal online help chapter "General information on loading" and in the SIMATIC STEP 7 Basic/Professional V15.1 system manual. The exact text is: "Software (all): The PLC program including all blocks, PLC data types and PLC tags is downloaded to the target and all values are reset to their initial values. Be aware that this also applies to retentive values."

    Is "Software (changes)" always safer than "Software (all)"?

    For retentive data, yes — provided that no retentive tag has changed its name, data type, address, or retain attribute. If those structural attributes change, "Software (changes)" can still cause retentive loss or generate a consistency error that forces a full reload.

    What is the difference between RETAIN and RETAIN_PERSISTENT?

    RETAIN values survive STOP/RUN transitions and power cycles on a configured CPU. RETAIN_PERSISTENT values additionally survive a memory reset (MRES), "Reset to factory settings", and a SIMATIC memory card transfer. RETAIN_PERSISTENT is supported only on S7-1500 CPUs with sufficient backup energy.

    Why does TIA Portal V15 not show the retentive warning?

    The retentive-specific warning was added to the documentation in V15.1. V15 manuals describe the general "values reset" behavior but do not call out retentive data specifically. The behavior itself is identical from V13 onward — only the documentation clarity improved.

    Back to blog