Data structure tips for Logix controllers

Save memory and optimize performance of Rockwell Automation controllers.

02/22/2008


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...
Each year, a panel of Control Engineering editors and industry expert judges select the System Integrator of the Year Award winners.
Control Engineering Leaders Under 40 identifies and gives recognition to young engineers who...
Learn more about methods used to ensure that the integration between the safety system and the process control...
Adding industrial toughness and reliability to Ethernet eGuide
Technological advances like multiple-in-multiple-out (MIMO) transmitting and receiving
Virtualization advice: 4 ways splitting servers can help manufacturing; Efficient motion controls; Fill the brain drain; Learn from the HART Plant of the Year
Two sides to process safety: Combining human and technical factors in your program; Preparing HMI graphics for migrations; Mechatronics and safety; Engineers' Choice Awards
Detecting security breaches: Forensic invenstigations depend on knowing your networks inside and out; Wireless workers; Opening robotic control; Product exclusive: Robust encoders
The Ask Control Engineering blog covers all aspects of automation, including motors, drives, sensors, motion control, machine control, and embedded systems.
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
News and comments from Control Engineering process industries editor, Peter Welander.
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
This is a blog from the trenches – written by engineers who are implementing and upgrading control systems every day across every industry.
Anthony Baker is a fictitious aggregation of experts from Callisto Integration, providing manufacturing consulting and systems integration.
Integrator Guide

Integrator Guide

Search the online Automation Integrator Guide
 

Create New Listing

Visit the System Integrators page to view past winners of Control Engineering's System Integrator of the Year Award and learn how to enter the competition. You will also find more information on system integrators and Control System Integrators Association.

Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.