Data structure tips for Logix controllers

Save memory and optimize performance of Rockwell Automation controllers.


To get maximum performance from a control system, it’s important to think ahead. Logix architecture (ControlLogix, CompactLogix, FlexLogix, SoftLogix5800, and DriveLogix), the following tips can help you save memory and optimize performance of your control system.

Use a 32-bit data type

One of the first factors to consider when designing a control architecture is data organization and performance. If your controller uses a 32-bit processor, performance and memory use are optimized by using 32-bit data types. If you use non-32-bit data types with 32-bit CPUs, each instruction can take up unnecessary memory space, which, multiplied by thousands of instructions, can quickly consume available memory. This is especially crucial to consider for smaller controllers with limited memory.

For example, using double integer (DINT) data types instead of integer (INT) data types helps reduce execution time and memory usage. Executing a simple ADD instruction with INT data types, like INT + INT = INT, takes 260 bytes of memory and 3.49

The reason for this significant difference in memory use and execution time is that the controller converts each INT to a DINT before it adds them together, and then has to convert the sum back to an INT. It takes additional execution time and memory to store the intermediate values created during these additional conversions.

Make the most of user defined structures

User defined structures allow you to combine multiple data types (atomic, predefined or user defined) into a new data type. The way you create user defined structures can greatly influence memory use and performance.

All elements in a structure are located on a byte (8 bit) boundary, and grouping like elements together when creating a user defined structure will help reduce memory use and execution time when accessing data.

Optimize with arrays

The Logix Integrated Architecture uses tag-based programming, and the method used to create tags in the controller directly impacts performance in terms of execution time for accessing data.

Creating individual tags in your program results in the creation of scattered tags in the memory of the controller. The scattered tags must have pointer data associated with them, which requires more time when trying to access the tags. Instead, create tags in arrays or user defined structures in the tag database. This way, tags are created consecutively in the controller’s memory, which means data can be read much faster.

Fred Habenschuss is application engineering manager, field marketing services, for Rockwell Automation. Rockwell Automation’s Integrated Architecture provides one environment for sequential, process, drive, and motion control programming. RSLogix 5000 Enterprise Series software is designed to work with the Rockwell Automation Logix controller platforms. It offers an IEC61131-3 compliant interface, symbolic programming with structures and arrays, and a comprehensive instruction set. It also supports relay ladder, structured text, function block diagram, and sequential function chart editors, and provides support for the S88 equipment phase state model for batch and machine control applications via the PhaseManager optional feature.

No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Salary and career survey: Benchmarks and advice; Designing controls; Remote data collection, historians; Control valve advances; Hannover Messe; Control Engineering International
System integration: Best practices and technologies to help; Virtualization virtues; Cyber security advice; Motor system efficiency, savings; Product exclusives; Road to Hannover
Collaborative robotics: How to improve safety, return on investment; Industrial Internet of Things, Industrie 4.0: World views; High-performance HMI, Information Integration: OPC and OMG
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.
PLCs, robots, and the quest for a single controller; how OEE is key to automation solutions.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Getting to the bottom of subsea repairs: Older pipelines need more attention, and operators need a repair strategy; OTC preview; Offshore production difficult - and crucial
Digital oilfields: Integrated HMI/SCADA systems enable smarter data acquisition; Real-world impact of simulation; Electric actuator technology prospers in production fields
Special report: U.S. natural gas; LNG transport technologies evolve to meet market demand; Understanding new methane regulations; Predictive maintenance for gas pipeline compressors
click me