In the last ladder logic article, Ladder Logic 201, we began to see some of the interaction between PLCs and ladder logic, and that will continue now with a quick introduction to ladder and PLC memory organization and its benefits.
Memory Allocation
One of the first things to consider when designing a PLC system is memory allocation. PLC memory used to be quite small (by today’s standards), and only about one kilobyte of flash memory was available for programmers to use in a particular PLC. Even though today’s technology comes with more memory, it still needs to be used efficiently, and that is where memory allocation comes in. When you allocate a PLCs available memory, you are assigning it to be used in different ways by different parts of the ladder program.
I/O Memory
All PLC platforms have input and output (I/O) memory; this is because ladder reads the inputs at the beginning of a scan, writes them to a memory table, and does just the opposite for output variables. For more information on PLC/ladder scanning, check out Ladder Logic 201.
Data Memory
When a ladder program utilizes functions such as timers or counters, a dynamic form of on-the-go memory is needed since functions have special data types like presets, accumulated values, and "done" bits. While most platforms generally have some assigned areas reserved for these values, most work in dissimilar ways depending on the manufacturer. Indeed, different PLCs come with different options; some have only pre-assigned timer and counter registers, while others keep registers reserved for any kind of intermediate value (such as integers, floating point values, or strings) so they can remain flexible to the use any function required of them.
Data Blocks
Some platforms, such as Siemens PLCs, allow data to be organized into data blocks. These are structured by the programmer and can contain mixed data types. This allows for more application specific data organization and user-defined types, which can be used to further define data.
Tag Data
Most new PLC platforms have tag-based systems which allows users to add memory in the form of tags, or text-based addresses as needed and with their own scope. When tags are created, the software associates the tag name to a physical memory location, allowing instructions to execute logic referencing data addressed by a tag. Since tags are readable by the programmer and usually descriptive, tag-based programming allows programs to be uploaded and read with greater ease.
Ladder Logic 202
The details of memory allocation vary from platform to platform, but it should be apparent that planning memory usage and assignment before starting to program not only saves the user time with appropriate tagging, but a PLC running efficiently also carries the benefit of giving your manufacturing floor one less excuse for falling behind in production.
Our PLC technicians here at PanelShop.com are experts in their fields, and have no problem allocating memory for the most efficient use of space. If you have any questions about ladder or PLC memory management, give us a call today!
You May Also Be Interested In Reading