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!