PLC Memory

SLC 500 CPU - Courtesy of
SLC 500 CPU – Courtesy of

As I have mentioned previously, I have been working on a generic PLC course that I hope to release in some kind of online software format soon. I was able to test a prototype a few weeks ago with a regular customer of mine down in Miami, and it went pretty well. I have nearly doubled the size of the material since then including a fairly extensive computer and PLC history, which I may post excerpts from later.

Todays post is an excerpt from part of the course, and I welcome any comments or critiques. As this is an evolutionary process, it will undergo many changes.


Excerpt from “Battery/Memory Backup” in PLC Hardware section

Program and data memory in a PLC is contained in “RAM” (Random Access Memory). This type of memory may be volatile or non-volatile, and it can (and will) be overwritten often. The program itself is in one area of RAM and must be kept in memory even when the PLC is powered off.  Older PLC systems required a battery or a “super-capacitor” to back up the program when power was removed for long periods of time, newer platforms can save the program to non-volatile memory such as CompactFlash and Secure Digital (SD) RAM. On these older battery-backed platforms, if the battery died, the program was lost.

Excerpt from “PLC Memory”

PLC Memory consists of the operating system and firmware of the processor and modules, and the program and data that is used by the programmer. In the previous hardware section it was explained that there are volatile and non-volatile areas of memory, and that the volatile part of memory needs a battery, “super capacitor” or other rechargeable energy storage module to hold its program and/or data.

Though the program can be saved on Flash or SD RAM cards without a battery, the data exchange rate is too slow to use this for the actual interfacing of the program with its data. When the PLC is powered on, the program is loaded from non-volatile RAM cards into the user memory of the controller. Not all PLC platforms back up the user memory with a battery or other energy storage device, data memory may be lost when a processor loses power. Some platforms, however, ensure that the data is kept intact even when power is lost by use of battery backed RAM. This means that the values in data registers will be retained and the program will start in its last state.

Other PLC platforms assign some parts of RAM to be “retentive” and other parts non-retentive. Omron separates its retentive bits into “holding” relays and non-retentive “CIO”, and its data into the retentive DM Area and non-retentive “Work Area”; Siemens allows its general “marker” memory to be assigned as retentive or non-retentive and defaults to only 16 bytes of retentive marker memory. Siemens data blocks however are retentive unless defined not to be. Allen-Bradley’s memory is all retentive.

The operating system itself on a processor is held in non-volatile memory, called “firmware”. To change the firmware on a PLC a “Flash” program or tool needs to be used to download it. This is usually included with the programming software.

I/O, communications and other modules also often have firmware built in. The firmware update tools can also update these modules and the firmware is usually available from the manufacturer’s website. It is necessary to have software that is at least as up-to-date as the firmware being installed.

The RAM part of memory in a PLC can be separated into two general areas; Program Memory and Data Memory.

Program memory consists all of the lists of Instructions and Program Code. This is what is sent to the processor. The act of sending the program instructions to the PLC is called “downloading” on most brands of PLC, however this may differ on some platforms.

Data memory includes the Input and Output Image Tables as well as Numerical and Boolean Data. You will find that most of the data used in the PLC program is internal memory and not directly related to I/O!

As the program executes, it keeps track of whether bits (BOOLS) are on or off and the values of numbers in Data Memory. Different platforms have different ways of organizing data; some of these methods will be discussed in this section.


As I mentioned in my post a few weeks ago, my attempt with this course (Module I) is to provide a background in general PLC knowledge before progressing into specific platforms. I also plan to create an advanced generic course (Module II) that covers programming technique; most courses cover instruction sets rather than the methods that are used in industry.

I still teach Allen-Bradley and Siemens courses for Automation Training, so if you want to learn ControlLogix, SLC, S7 or even Omron and Mitsubishi platforms, please contact them directly or drop me a line. This is the best way to learn these specific platforms, you can either attend regional classes or even set up a class at your plant!

I welcome any comments/critiques you may have on this material. I plan to post more excerpts over the next months; if you are interested in helping out a bit more please contact me through this site or on Linked In.

As usual, thanks for checking out my blog!


Electrical Engineer and business owner from the Nashville, Tennessee area. I also play music, Chess and Go.

15 Comments on “PLC Memory

  1. I have tried to clear an era log from my omron cj1 without success. Its a new installation with four componentes power rack; CPU; input module and output module but i did not close the end Of the output module. Could that be contributing to the fault

    • Hi Benson, I’m not sure what you are asking. The error log is just that: a record of faults on the processor. If you don’t correct the fault, of course it remains. What do you mean by closing the “end” of the output module? If you are talking about an end cap for the rack, yes it is necessary to terminate the bus.

  2. Hi Frank,

    I’m helping a student to fix the PLC from his machine.

    The PLC brand is Mitsubishi FX2NC-32BL.

    The battery is flat we need to change it.

    I’m fairly new to PLC so I’m unsure how to proceed with the repair.

    Here is my question:
    1. The program has been erased due to flat battery but what about the actual software itself do I need to download a new one? will a software erased when a battery goes flat?

    • Hi Andrew, before answering I will say I am not an expert on Mitsubishi. However, most PLCs have certain things in common, so here goes.

      The purpose of the battery as you have found is to hold the program in memory. When it goes “flat” as you put it, that means it won’t charge anymore and you have to replace it. If the PLC has simply not been powered on for a long time, the battery may still be fine, it just needs to be charged. There is often a “Super capacitor” that will hold the program for several hours or even days, so you can change the battery and not lose the program.

      In your case it sounds like the program is gone. In this case, either replace or charge the battery and then download the program. The only thing that is volatile and backed by the battery is the program and associated memory registers, so the operating system is still there, there is nothing else to download.

      When you mention downloading software, the programming software is not part of the download, it is only present on the computer that programs the PLC. This is also true of program comments and descriptions. Hope this helps!

    • Please explain about the Mitsubishi R series plc memory classification in terms of RAM ,ROM and FLASH ROM .
      I am trying to find out the basic on which I could easy understood that if we download only programme and Parma meter then the device area momory will remain as it was earlier or it will change ?

  3. Its good to know about the plc memory, but I have a query.I have endeavoured to clear a time log from my omron cj1 without progress. Its another establishment with four components control rack; CPU; input module and yield module yet I didn’t close the finish Of the yield module. Could that contribute the blame

  4. Sir….. I want to learn plc and dcs and programming class iam from hyderabad….

    • Hi Abdul, there are LOTS of PLC classes in India, probably more than there are in the US. I would suggest finding one there, the US is very expensive comparatively. And then there’s the time zone difference…

  5. i want a help. did you can tell me, what are the advantages of edge trigger input over the normal input? and application of program memory and data memory?

    • Hi Thilina, probably the easiest way to explain where edge triggers (one shots) are used is in any event based action. For instance, if used with a latching rung in ladder, the rung will be unlatched unconditionally, but latched only right when the signal occurs. That way if the latching signal stays on, it will have to go off and then back on again to re-latch the bit. I showed examples of this in an article I wrote here:
      This and many other PLC articles can be found under the PLC tab at the top of this blog.

  6. It’s hard to come by experienced people about this subject, however, you sound like you know what you’re talking about! Thanks

  7. An alternative to PLCs used in remote locations is the remote terminal unit or RTU.An RTU is a low-strength, rigid PLC whose main function is to manage links to sites and central control systems (usually SCADA) or some modern systems,

  8. It tolerated the industrial environment better than computers and needed to be more reliable, compact, and less maintenance than relay systems.