PLC Program Backup and Recovery: Version Control and Battery

The Day the PLC Lost Its Mind

A PLC on a packaging line died — the CPU faulted, the battery alarm went off, and the program vanished. The maintenance technician plugged in his laptop, opened the backup folder, and found the last program was from three years ago. The line had been modified four times since then. Nobody had re-backed it up. The recovery took two weeks of re-engineering: the ladder logic had to be reconstructed from memory and the machine’s wiring. The customer lost $80,000 in production. The root cause was not a failed PLC. It was a failed backup process.

A PLC program is the machine’s brain. If you do not have a current backup, you do not have a machine — you have a box of parts. Here is how to back up and recover correctly.

What to Back Up

A “program backup” is more than the ladder logic. Back up the complete image:

  • The PLC program (ladder, structured text, function block).
  • The parameter set (I/O configuration, communication setup).
  • The HMI project (screens, recipes, alarms).
  • The servo drive parameters (if tuned — these are often not in the PLC).
  • The robot program (if a robot is on the line).
  • The recipe database (product parameters).

The most common omission is the servo parameters. When the drive is replaced, the technician restores the PLC program but forgets the tuning — the machine runs, but with the wrong gains, and it vibrates. The full image includes everything.

Where to Store It

A backup that lives on the same laptop that walks out the door is a backup you do not have. Store the backup in at least two places:

  1. A network drive (controlled, versioned).
  2. A USB stick kept physically in the control cabinet (labeled).

The USB in the cabinet is the emergency recovery. The network drive is the history. The laptop is the working copy. If one fails, the other two remain.

The backup rule: Every time the program is modified, back up. Version the backup (filename: “Line1_v23_2026-09-18”). The PLC that died had a backup from 2023; the modifications from 2024–2026 were never saved. If the change is not in a backup, it does not exist.

Version Control: Name the File

Do not save it as “backup.bin.” Name it with the machine, the date, and a version number. A folder of backups should look like a history, not a graveyard:

  • Line1_v20_2026-06-01.zip
  • Line1_v21_2026-07-15.zip
  • Line1_v22_2026-09-01.zip
  • Line1_v23_2026-09-18.zip

When the machine breaks after a change, you roll back to the last known good version. Without version numbers, you are guessing which backup is which.

The Recovery Test: Do It Once a Year

A backup you have never restored is a backup you hope works. Once a year, practice the restore. Load the backup onto a spare PLC (or the offline simulator), verify the I/O, the HMI, and the recipes. If the restore fails, you find out now — not at 2 a.m. when the line is down. The most common discovery: the backup was incomplete (missing HMI or drive parameters). A practice restore catches that.

The Battery: The Clock That Runs Out

PLC programs are stored in RAM backed by a battery. The battery lasts 3–5 years. When it fails, the program is gone. Every PLC has a battery alarm (a blinking light or a diagnostic message). Replace the battery on schedule (every 3 years, or when the alarm appears) — while the PLC is powered, not after. A dead battery with no backup is the two-week recovery.

A Backup Checklist

  1. Is there a current backup of every PLC on the line?
  2. Does the backup include HMI, drives, and recipes (not just ladder)?
  3. Is the backup on the network AND on a USB in the cabinet?
  4. Is the filename versioned (machine, date, version)?
  5. Has the restore been tested in the last 12 months?
  6. Is the battery within its 3-year life?
  7. After any program change, was the backup refreshed?
  8. Is the offline project on the engineer’s laptop synchronized?
  9. Is there a paper printout of the ladder (for emergency)?
  10. Who to call (in-house or integrator) if recovery fails?

The Bottom Line

The PLC that lost its mind did not need a miracle — it needed a backup that was a year old, not three. Back up after every change, store it in two places, version the filename, test the restore annually, and replace the battery on schedule. The recovery that took two weeks should take two hours. The difference is a backup habit, not a better PLC.