Skip to main content
Call Eric:863-698-8266
CURRYCONTROLS.COMControls & Automation Knowledge Hub
ReferencePLCFundamentalsProgramming

Retentive Memory

What survives a power cycle in a controller and what does not, how retention is backed up by battery, capacitor, or nonvolatile storage, what should be retentive, and how retained data gets lost.

8 min readUpdated Sep 5, 2026Published Sep 5, 2026By Eric Sullivan

The short answer

Retentive Memory

Retentive memory is the data that keeps its value through a power cycle: setpoints, totals, run hours, and the state of anything that must resume where it left off. Whether a given tag is retentive depends on the platform, and what protects the retained data depends on the hardware: a lithium battery, an energy storage capacitor, or nonvolatile memory. The two failures that matter are a backup that has silently died, and a restore from a stale copy that quietly overwrites months of changes.

Key points

  • Platforms differ on what is retentive by default; find out for yours rather than assuming.
  • A battery lasts a few years and warns before it dies; a capacitor module lasts the life of the controller but holds data only for days; a nonvolatile card holds it indefinitely.
  • Setpoints, totalizers, run hours, and alternation state should be retentive; step numbers, commands in progress, and timers usually should not.
  • A download loads the tag values saved in the project and overwrites what the controller had; upload first.
  • First-scan logic decides what the plant does on power-up, and it should be written, not assumed.

What is retained

The controller has the program and it has the data table, and at power-up it needs both. The program is held in nonvolatile memory or restored from a card on every platform. The data is another matter. Some platforms retain the entire data table, so every tag comes back with the value it had. Some retain only areas or files marked retentive, and everything else returns to zero. Some retain timers and counters only if a retentive instruction was used. The platform manual states the rule, and it is different enough between vendors that assuming it from a previous project is how a plant comes up with every setpoint at zero.

What protects it

Lithium battery
Holds up the memory when power is off. Lasts two to five years depending on the controller and how much of that time it spends without power. The controller warns when it is low, on a status light and in a status bit, and the warning is the most ignored indicator in the industry. Replace on a schedule, and replace with the controller powered so the memory is held during the swap.
Energy storage module
A capacitor bank that charges while the controller runs and powers the memory long enough to write it to nonvolatile storage when power fails. No maintenance and no replacement, at the cost of holding data only for days to weeks if the controller is left unpowered, and a module that has aged holds less.
Nonvolatile memory card
A removable card holding a copy of the program and, optionally, the data table. The controller can be set to load from it on power-up, on a corrupt memory, or never. It is the only protection that survives indefinitely without power, and it is also the one that can restore a copy months out of date.

What should be retentive

DataRetentive?Reason
Setpoints and tuning constantsYesThey are the configuration of the plant and re-entering them is slow and error prone
Totalizers and run hoursYesA total that resets on every power cycle is not a total
Lead and lag alternation stateYesOtherwise the same pump is lead after every outage
Alarm acknowledgment and shelvingUsuallyAn operator who acknowledged an alarm should not have to do it again
Sequence step numberUsually notResuming in the middle of a step with equipment in an unknown physical state is dangerous; restart from a safe step
Commands in progressNoA start command retained through an outage starts the pump on power-up with nobody expecting it
TimersRarelyA retained timer resumes counting time that did not pass; make the decision per timer
Hand-off-auto selections from the HMIDecideRetaining auto restarts the plant automatically on power-up; retaining off leaves it down until someone arrives; the narrative says which
Deciding what survives a power cycle

First scan

Every controller exposes a first-scan bit, true for the first scan after power-up or after a transition to run. The logic that runs on it decides what the plant does: clear the commands in progress, reset the sequence to its safe step, validate the retained setpoints against their ranges, and decide whether equipment that was in auto restarts. Left unwritten, the plant does whatever the retained bits happen to say, which was correct at the moment the power failed and may not be correct ten minutes later with the wet well full and the operator on the road.

How retained data gets lost

  • The battery died, quietly, and the next power cycle found nothing to retain. The low battery indicator had been lit for months.
  • The controller sat unpowered on a shelf or in a de-energized panel long enough for the energy storage module to discharge.
  • A download loaded the project, and the project carried the tag values from the day it was saved, replacing the current ones.
  • A memory card set to load on power-up restored an old copy.
  • A firmware update or a processor replacement cleared the memory, and nobody had uploaded a current copy first.
  • The tags were never retentive on a platform that requires them to be marked, and this was the first power cycle since commissioning.

Keeping a copy

The defence against every one of those is a current copy: an upload from the running controller, including the data table, taken on a schedule and after every change, stored somewhere that is not in the panel. Setpoints can additionally be held in SCADA and written back to the controller on first scan, so that a controller that comes up with zeros gets its configuration back from the host. Both are cheap. Re-commissioning a plant from memory is not.

Frequently asked questions

What does retentive mean in a PLC?
That the value survives a power cycle. On some platforms every tag is retentive; on others only marked areas, files, or instructions are. The rest return to zero on power-up.
How long does a PLC battery last?
Two to five years depending on the model and how long the controller spends unpowered. The controller warns when it is low. Replace it on a schedule and with the controller powered, so the memory is held during the change.
Why did all my setpoints reset to zero?
The retention backup failed, a battery or a discharged energy storage module, or a download or a memory card restore replaced the current values with saved ones. Restore from the last upload, and then find out which happened so it does not recur.
Should the plant restart automatically after a power outage?
That is a decision per piece of equipment, written into the control narrative. Pumps in a lift station usually should. A chemical feed or a sequence that assumes a starting condition usually should not without checks. Either way, the first-scan logic implements the decision explicitly.

Direct contact

Have a controls question?

Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.