Help - Search - Members - Calendar
Full Version: PLC Processor memory usage
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
MotherPuncher
Hey all,

I'll try to keep this short. Our company makes purpose built controllers for a niche market. Currently, they're programmed in C, but we would like to try programming them in ladder logic. In researching doing this, I couldn't find any data on how much memory the operating software on a PLC is.

So what I'm asking is what is the amount of space required for the software on a PLC processor? Not the user program or program data, but the actual operating software that handles the ladder logic and executes the commands.

Thanks in advance


BobLfoot
QUOTE(MotherPuncher @ Nov 19 2008, 06:41 PM) [snapback]75961[/snapback]

I'll try to keep this short. Our company makes purpose built controllers for a niche market. Currently, they're programmed in C, but we would like to try programming them in ladder logic.


Can't help with your memory size question, but what purpose does it serve to know, unless you plan to make your own PLC.

As far as using a PLC to control your machine versus a "C" based computer. Try the AB 5000 series of processors and use Structured Text not Ladder. ST is close to C and the 5000 Family is based on "C".
pandersen
Normally the "OS" for the processor is not included in the advertised memory (as far as I've seen). If a PLC has 4MB of memory available, all of it is available for custom logic, tags, and I/O points.
b_carlton
Just a bit cynical but ... start writing your operating system. When you are done, check the size.
Ken Roach
You'd be amazed by how little of the internal operating system and architecture of a controller is understood, even within the major PLC vendors.

Limiting the topic to your original question and taking an unscientific wild guess, the operating system image for a 1756-L63 controller that supports 8 MB of user database and logic routines is 1855 KB. The ladder logic execution engine is custom and based on decades of A-B controller evolution.

If I were in your shoes and attempting to build a dedicated purpose controller that ran ladder logic, I'd head for the PLCOpen and ISAGraf projects.


andybr
I would have thought that the operating system for your controller should not need to change much at all. The issue would actually be how you compile the user programmes. The actual code which is downloaded to the controller should not be very different if the two compilers are reasonably efficient. Writing a compiler for your ladder code will be the difficult part.
Andybr
paulengr
QUOTE(MotherPuncher @ Nov 19 2008, 06:41 PM) [snapback]75961[/snapback]

Hey all,

I'll try to keep this short. Our company makes purpose built controllers for a niche market. Currently, they're programmed in C, but we would like to try programming them in ladder logic. In researching doing this, I couldn't find any data on how much memory the operating software on a PLC is.

So what I'm asking is what is the amount of space required for the software on a PLC processor? Not the user program or program data, but the actual operating software that handles the ladder logic and executes the commands.

Thanks in advance


You don't really have access to the "operating system" in a PLC. At best, you might be able to flash a different firmware, which is effectively the OS. Some (many) PLC's effectively have a compiler built into the ladder editting software. Others are nothing more than tokenizers that simply stick byte codes into the PLC. The hardware can get downright strange. There are at least 3 different CPU's inside of a PLC-5 that I was able to identify plus multiple ASIC's that actually make up the "interpreter" or operating system or whatever you want to call it. The ControlLogix PLC has at least 2 separate CPU's (one for IO and one for programs). Memory models are similarly goofy. Depending on the make/model the PLC "ladder" might even be fixed size rows within the memory. They didn't come right out and say it but it was very obvious that this was the structure of the old Square D PLC's (no longer produced). You also don't get involved as much in actually "compiling" the code. Code gets compiled almost on a line-by-line basis. From a user point of view, there's no separate "object code" or "binaries" to deal with. The program IS the program.

If you are switching over from "C", then I suggest as others have that you go one of two routes. Either adopt structured text which is very similar to C, or go with one that can run compiled programs. At one time, AB was selling the 1771-DMC module which was literally a complete embedded processor running OS-9 on an IO card that sat right alongside the PLC. I would strongly discourage you from even considering using that thing though. I have exactly one spare just in case I need it. After August, 2009, it's going in the trash bin or else getting sold on one of those "spare parts" web sites.

Instead, another model of PLC to consider is www.softplc.com. This PLC is very similar in terms of programming languages to the Allen Bradley PLC-5 (partly because the owner/author was on the PLC-5 development team). It runs on more or less stock industrial PC hardware on Linux. It already has built-in protocols for doing most of the common PLC remote IO networks. It can have "local" IO but these days, local IO tends to be overrated (and expensive) in many cases anyways. The really neat part for your application is that you can extend the base ladder logic language with either C++ or Java user functions. There's no "C-like" language at all to deal with. You will be able to use all of Allen Bradley's hardware except for the base PLC hardware.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.