IMDTouchKnowledge BaseShop main store

How-to

How to Back Up a PLC Program the Right Way

PLCs and controllers Published 7 min read

Short answer

A PLC program is backed up by uploading: reading the program out of the controller to a computer with the controller's own programming software over a supported connection. An HMI's USB port handles the panel's project, not the PLC's executable, so it is not a backup path. Prove the backup by reopening the saved file before you rely on it.

On this page
  1. Can I back up the PLC program through the HMI's USB port?
  2. Which direction is the backup — upload or download?
  3. What do I need to connect to the PLC's programming port?
  4. How do I read the program out of the PLC?
  5. How many copies of the PLC backup should I keep?
  6. How do I prove the backup is good before I need it?
  7. What should I do when the PLC refuses the upload?
  8. Questions asked

A PLC program is backed up by uploading: the controller's own programming software reads the program out of the controller to a computer over a supported programming connection, and you save that project as a file — named with the equipment tag, the controller model, and the date, for example LINE3-PLC-2025-06-18. On an Ethernet link the controller might sit at 192.168.1.10 with subnet mask 255.255.255.0, so your laptop goes at 192.168.1.50 on the same mask; on serial it is the vendor's cable on the programming port. Keep the saved file under the 3-2-1 rule: three copies, two media, one offsite. The HMI's USB port is not that path — it exists for the panel's project and data, not for extracting the PLC's executable. This article walks the whole job in order: separating the two assets, picking the safe transfer direction, making the connection, reading the program out, storing the copies, and proving the backup before you need it.

Can I back up the PLC program through the HMI's USB port? #

No. A panel's USB port serves the panel: it loads and saves the HMI project and recipe or data files. The PLC program lives in the controller, and nothing about the panel's port makes it a bridge for reading the controller's executable.

The panel and the controller are two separate computers holding two separate projects. The link between them — the pairing that raises this question is usually a small touch panel on a compact brick PLC — carries operator traffic: tag writes, screen data, alarms. It is not a programming session. If you maintain several panels on one controller, that shared link is exactly what connecting multiple HMIs to one PLC over a 200 ft serial link ([article:connecting-multiple-hmis-to-one-plc-over-200-ft-serial]) describes.

Unless the panel's documentation for your exact panel-and-PLC pair lists a PLC-program upload feature, the panel is out of the backup path. Assume it does not: back up the PLC from the PLC side, and the panel from the panel side.

Which direction is the backup — upload or download? #

Upload. Upload moves the program from the PLC to the computer, which is the backup; download moves a program from the computer into the PLC, which overwrites what is running. One of those two buttons is your backup; the other is a restore.

Packages label the pair differently — upload and download, read and write, load and store — and the direction, not the word, decides. Read the dialog before pressing it: the dialog states the source and the destination, which is the only fact that matters.

One safety rule: stop before a download on a running machine. A download replaces the program the moment it completes, and outputs follow the new logic immediately. A backup session never includes a download.

What do I need to connect to the PLC's programming port? #

Three things: the programming software for that controller family, a physical path over the controller's supported programming interface — Ethernet, USB, or serial depending on the model — and a computer that can reach it, on the same IP network for Ethernet links.

The programming software comes from the controller's vendor, and for several compact controller families it is a free download; it must be the family matching your model, because each family's software reads only its own controllers. On a serial link, use the vendor's cable or its documented pinout — hand-wired adapters are a classic silent failure, and the DH-485 wiring and RS-232 pin map for an HMI replacement ([article:dh-485-wiring-for-hmi-replacement-rs-232-pin-map]) shows how family-specific one mapping is.

Example for an Ethernet link, with illustrative addresses: the controller sits at 192.168.1.10 with subnet mask 255.255.255.0, and you set the laptop to 192.168.1.50 with the same mask. Both addresses then land on network 192.168.1.0/24, so the pair can exchange packets; a laptop left on a 10.x.x.x network cannot reach that controller no matter how correct the software is.

If the programming link graduates from a cable across the floor to a permanent drop, it is communication wiring, and the separation it must keep from power conductors is what NEC Article 800 communication cable separation requirements (https://industrialmonitordirect.com/blogs/knowledgebase/nec-article-800-communication-cable-separation-requirements) cover.

How do I read the program out of the PLC? #

Connect, confirm the software sees the intended controller, run the upload, then save what comes back — in that order. The identity check matters most: the step takes seconds and it is the difference between a backup and a file you cannot match to a machine.

  1. Record the controller family and model from its nameplate before connecting. The model decides the software, the interface, and the cable.
  2. Open the matching programming software and set its communication method — Ethernet, USB, or serial, per the model — to the path you physically have.
  3. Connect and let the software identify the controller. Compare the family, model, and node or IP address it reports against the nameplate; if they disagree, fix the connection before going further.
  4. Run the function whose direction is controller → computer: upload, read, or your package's equivalent. Watch it to completion and read every protection or compatibility message before acting on one.
  5. Save the retrieved project immediately, in the software's native project format, with a filename that carries the equipment tag, the controller model, and the date — for example LINE3-PLC-2025-06-18.
  6. Close the session read-only: no download, no clear, no memory reset, no defaults.

The save in step 5 is the backup. Everything before it is how the file comes to exist; everything after is how you know it is good.

How many copies of the PLC backup should I keep? #

Three copies, on two different kinds of media, with one of them offsite — the 3-2-1 backup rule — and the PLC and HMI projects filed as two separate, clearly named assets. The rule requires, in plain terms: at least three copies of the file counting your working copy, on at least two distinct storage types, with at least one copy stored away from the machine's site.

Worked example. The upload lands on the laptop's internal drive (copy 1). You copy that file to a USB flash drive kept in the control-cabinet book (copy 2) and to the plant engineering server that replicates to another site (copy 3). Storage types in play — internal drive, flash, server — clear the two-media requirement with margin, and the server copy is the offsite one.

Now the arithmetic that justifies the rule: the laptop drive and the flash drive both die the month before the controller's CPU fails. Three copies minus two failures leaves 3 − 2 = 1 usable copy, and the machine still recovers. Run the same two failures against a single-copy habit and 1 − 2 leaves nothing; the program is rebuilt line by line.

Every copy carries the same name — equipment tag, model, date — so any copy can be matched to the machine and the day it was read. The HMI project stays a separate asset with its own backup file, kept apart so nobody restores a panel project expecting PLC logic.

How do I prove the backup is good before I need it? #

Reopen the saved file from its backup location — the USB drive or server path, not your working folder — in the programming software, and confirm it loads as the expected controller project. A file you have not reopened is a hope, not a backup.

Four checks, in order:

  • It opens in the same programming software without conversion errors.
  • It identifies as the family and model you recorded from the nameplate.
  • It shows real content — logic, configuration, comments where they exist — not an empty project shell.
  • Its filename and the equipment record agree.

Only when the new read passes all four do you retire the previous known-good copy; keep the two side by side until then. An empty project, a blank file, or a panel project that happens to sit on the same drive is not a backup of the PLC.

What should I do when the PLC refuses the upload? #

Fix the path before touching the controller: check the model against the software and cable, check the port or IP selection, and read any protection or compatibility message. Never clear or default the PLC to force a read — that is how programs are lost.

Three checks resolve most refusals:

  • Wrong pairing: the software family does not match the controller model; the nameplate, not the cabinet drawing, decides.
  • Wrong path: the interface selection in the software does not match the cable you plugged in, or the IP arithmetic above does not work out.
  • Wrong state: some controllers accept a program read only in a particular mode, and the software states that when it applies.

A protection message is not a connection failure; it is an access question, and its legitimate routes are the machine builder's records and the controller vendor's documented access procedure — neither involves clearing memory. If no authorized path opens the read, the machine's honest status is 'no backup exists,' and the next call is to the machine builder, which is still cheaper than a destructive guess.

Questions asked

How often should a PLC program be backed up?

At every accepted change and at every planned event that can lose it: commissioning, firmware updates, hardware swaps, and before scheduled shutdowns. Label every file with its date so the newest accepted version is obvious. A program that changed after the last backup exists only inside that controller.

Should the HMI project be backed up at the same time?

Yes, but as its own file, made from the panel side with the panel's configuration software, never as a stand-in for the PLC program. Do it in the same session so both files carry the same date, and the pair stays matched when one side changes.

Can the backup be taken while the machine is running?

Yes. An upload is a read: the software copies memory out and writes nothing back, so the controller keeps scanning. The risk runs the other way. A download changes the program and the machine's behavior the moment it completes, so it belongs on a stopped, verified-safe machine.

The upload is refused and the PLC asks for a password. What now?

Stop, and do not guess or reset the controller. Program protection is deliberate, usually the machine builder's intellectual property, and the legitimate routes are the builder's records or the controller vendor's documented access procedure. Until one of those opens the read, the honest status is that no backup exists for this machine.

Keep reading

  • How-to

    Connecting Multiple HMIs to One PLC Over 200 ft Serial

    RS-232 on good cable can reach 200 ft at 9600 baud, but RS-232 connects exactly two devices, so three HMIs cannot share one PLC port. Put an RS-232-to-RS-485 adapter at the PLC and at each panel, daisy-chain one twisted pair, and terminate only the two ends. Confirm the PLC port's protocol accepts more than one master before ordering adapters.

    Industrial networks