
Preface
In 1997, Rockwell Automation launched its current generation control platform, Logix. Logix represented decades of technical advancement in automationfor robust, large-scale solutions. The RSLogix 5000 programming software (from version 21 and above, it is referred to as Logix Designer within the Studio 5000 software package) provides a unified IEC61131-3 control platform featuring user-friendly interfaces and workflows. Ultimately, the Logix platform reduces programming complexity, eases troubleshooting, and increases plant reliability.
RSLogix 5000 provides intuitive access to real-time information, easy-to-follow runtime logic animations, and a comprehensive suite of online change capabilities. Rockwell's market share is second only to Emerson in North America. Moreover, due to Rockwell Automation's continued success and the glacial speed at which most plants switch platforms, it will be the market leader for the foreseeable future. Globally, Rockwell Automation is the fifth-largest automation manufacturer (behind Siemens, ABB, Emerson, and Schneider). Rockwell Automation's total global install base is well over 2 million programmable controllers. Needless to say, as an automation professional, learning the Logix platform suite is an excellent investment of your time.
Rockwell Automation has provided a wealth of knowledge in their web-based Literature Library, which is the ultimate source of all Logix platform knowledge. Rockwell has created a library of over 10,000 documents that are often difficult to navigate for beginners. Learning RSLogix 5000 Programming, Second Edition is in no way a replacement for this resource (this book would need to be 100,000 pages longer) but provides newcomers with a solid foundation in the Logix platform features and Rockwell Automation terminology. By the end of each chapter, links to the relevant Literature Library resources are provided to allow you to dive deeper into the topics covered. The final chapter of this book crystalizes what has been learned in a working control-system example that you can build at home. The final project of this book details all the steps required to create a Rockwell-powered robot bartender from the ground up. By the end of this book, you will have a clear understanding of the capabilities of the Logix platform and be able to quickly navigate the Rockwell Automation Literature Library resources. Moreover, you will have the unique experience of purchasing, building, wiring, and programming a control system from end to end.
Learning RSLogix 5000, Second Edition provides a gentle introduction to RSLogix 5000/Studio 5000 and the Logix platform. If you are new to Programming Logic Controller (PLC) programming or have experience with programming other PLC platforms, then this book will provide you with the knowledge of the Rockwell family of controllers and teach you how to become proficient at implementing Logix solutions from the ground up.
Who this book is for
The purpose of this book is to explore the hardware, software, and programming of the Logix platform so that electricians, instrumentation technicians, automation professionals, industrial control system network defenders, and students who are familiar with automation can get up to speed with a minimal investment of time . I intentionally focus on the essential requirements for selecting, configuring, and programming a modern Logix application to get you working with the platform as quickly as possible. Once you have a solid fou ndation in the Rockwell Automation Integrated A rchitecture system, you will be able to further your knowledge of any topic using the online Literature Library.
What this book covers
Chapter 1, History of the Rockwell Automation Technologies,provides a history of industrial control systems and the Rockwell Automation ecosystem. It is important to understand the legacy systems provided by Rockwell Automation because some of them can still be found operating in the field today. Also, it is important to understand the overall Rockwell Automation offering, terminology, and how the platforms we focus on in the book fit into that world. Rockwell Automation's Integrated Architecture system is outlined, as is where ControlLogix fits into their larger strategy.
Chapter 2, Understanding ControlLogix, introduces the flagship controllers available within Rockwell Automation's Integrated Architecture system. We cover the controller solutions available within the Integrated Architecture system and learn how to make solution architecture decisions. We explore the physical features and diagnostic information available on the ControlLogix cards and investigate the evolution of the platform's firmware. Finally, we learn the differences between the traditional synchronous PLC scan and the Logix asynchronous operating cycle.
Chapter 3, Understanding CompactLogix, introduces the full line of CompactLogix controllers available within Rockwell's Integrated Architecture system. We learn about the CompactLogix 5480 hybrid controllers, and their unique position in the industrial marketplace. We gain an understanding of the controller solutions available within Integrated Architecture and learn to make CompactLogix architecture decisions. We also learn how to use Rockwell's online resources to identify the modules that are compatible with our solution.
Chapter 4, Understanding SoftLogix, teaches us about the SoftLogix 5800 controllers, which enable us to create a PC-based Logix controller rack. We learn how to create a virtual rack that houses our virtual controllers and virtual communication modules. We also learn that SoftLogix is another component of Rockwell Automation's Integrated Architecture system and can interface with the other Logix controllers, communication modules, and I/O modules. We also learn that by taking advantage of the computing power of modern PCs, the SoftLogix controllers are capable of processing larger volumes of data and at a higher speed than even the most powerful Logix controller.
Chapter 5, Understanding the Logix Emulate 5000, teaches us how to leverage a virtual Logix controller and rack to facilitate debugging Logix program code using features such as breakpoints and tracepoints. In this chapter, we create a virtual test rack using similar modules to a physical rack and create a simple test. We learn the critical differences between Emulate 5000 and SoftLogix 5800. We learn how to create a RSLogix Emulate 5000 solution containing modules that are configured in a virtual Logix rack to mimic the end solution.
Chapter 6, Industrial Network Communications, introduces the various communication technologies available for the Logix platform. The focus of this book is the current state of Rockwell Automation's ControlLogix and CompactLogix controllers; however, we will touch on some legacy communication protocols that you may still find running in the field today. Communications allow us to interface with controllers, racks, and devices on our network. Establishing communications is an important step that enables us to connect with a device and transfer configuration changes and programs. In completing this chapter, you will be familiar with all the Rockwell Automation communication technologies that have been used in the past and that are actively used in the field today.
Chapter 7, Configuring Logix Modules, enumerates the available modules for the Logix platform, how to configure them, and their usage in a Logix project. We will also include methods for identifying module features by their Logix module catalog numbers and introduce the address tree that a typical I/O module creates. After completing this chapter, you will be able to select and add I/O modules to your projects, modify the module configurations, and reference their real-time values using the recommended best practices.
Chapter 8, Writing Ladder Logic, looks at the history of ladder logic and the development of the IEC standard programming languages. Then, it jumps into ladder logic programming by creating a simple pump control program. We demonstrate how to buffer inputs and outputs in our ladder logic code and discuss the importance of this process. At the end of the chapter, you will be able to read and write IEC ladder logic for the Logix platform and for multiple other vendors that support IEC standard programming languages.
Chapter 9, Writing Function Blocks, explores the origins of Function Block Diagrams (FBDs) in systems engineering and introduces the basic concepts of IEC FBD programming. We learn how to create FBDs by dragging and dropping elements into a sheet in a routine. The way Logix compiles IEC languages down to bytecode is also explored in this chapter. We learn how to wire input and output references to Function Block pins and identify digital and analog connections before monitoring their values online. By the end of the chapter, you will understand how to read and write Function Blocks and be able to apply this knowledge to Rockwell products or products from other industrial automation vendors that conform with the IEC standards.
Chapter 10, Writing Structured Text, introduces you to the best uses for Structured Text (ST) within an automation solution. We start by exploring the ST editing environment and then introduce some of the new editing features available in Studio 5000 version 31 and higher. We create a simple ST routine and learn about the powerful syntax of ST code. Then we explore the full range of operators, expressions, instructions, and constructs available in the ST language. You will gain a solid foundation to help you read and write ST code within Logix and within other products that implement the IEC standard ST language.
Chapter 11, Building Sequential Function Charts, introduces you to Sequential Function Charts (SFCs) and typical usages within an automation solution. The core elements that make up an SFC are covered, and you will create a simple backwash process routine. We will learn how the usage of SFC varies from industry to industry. You are also shown that there are certain cases where leveraging the IEC SFC construct can greatly simplify the creation and debugging of a program. As with the previous IEC languages covered in this book, we will learn that selecting the appropriate language for your application is like selecting the correct tool to solve the problem you are facing. Although some programmers will only ever write in ladder logic, we learn that there are many advantages of using the full range of IEC languages where appropriate.
Chapter 12, Using Tasks and Programs for Project Organization, investigates the project organizational units used throughout this book. It details the way a Logix controller executes tasks and how the CPU divides its time based on priority. It introduces the overhead time slice and emphasizes its importance when optimizing a Logix application. Finally, it investigates methods within the Logix platform to monitor and troubleshoot performance issues. By the end of the chapter, you will be able to troubleshoot and optimize Logix project performance on larger solutions.
Chapter 13, Faults and Troubleshooting in Logix, provides recommendations for improving your troubleshooting capabilities in the Logix platform. It teaches us how to identify and troubleshoot the various types of faults that can occur in a Logix solution. In this chapter, we will use ladder logic to trigger a major fault, and then learn how to trap the major fault and prevent the controller from stopping when it occurs. Finally, we will highlight the FactoryTalk TeamONE app provided by Rockwell Automation for troubleshooting the Logix issues while in the field from a mobile device. By the end of the chapter, you will be comfortable investigating issues and will know where to find additional support if required.
Chapter 14, Understanding Cybersecurity Practices in Logix, introduces some of the industrial control system cybersecurity resources provided by Rockwell Automation and the tools that can be used to prevent unauthorized views or edits of projects. Rockwell has invested heavily in its cybersecurity practice over the past decade and has come to the table with numerous products, services, and guidance to help protect their customers from cyber threats. By the end of the chapter, you will be familiar with the Rockwell cybersecurity solution landscape and the features that can be enabled in a Logix solution to protect the process and code base.
Chapter 15, Building a Robot Bartender in Logix, combines the skills we have learned throughout this book into a sample application. This chapter steps through building a complete robot bartender control system from scratch, including configuring the modules, writing the code, and downloading it into our PLC. At the end of this chapter, you will understand how to select the components required for a simple ControlLogix industrial control solution. You will also learn how to wire digital input and output cards for a small control system project. After completing this project, you will gain a deeper understanding of the entire industrial control system building, tuning, and troubleshooting process and will be able to apply this knowledge to real-world control environments.
To get the most out of this book
To get the most out of this book, you should create a Rockwell Support account by visiting the following URL:
https://www.rockwellautomation.com/account/create-account
The account is free, and the material we will be reviewing in this chapter is publicly available to anyone who has registered with Rockwell Automation.
You will also need a copy of RSLogix or Studio 5000 to program your project. You can either purchase this from your local distributor or request a time-limited trial version. You can find a local distributor for Rockwell products at the following URL:
https://locator.rockwellautomation.com/

To complete the robot bartender build in the last chapter of this book, you will also need to have several tools and purchase some Rockwell Automation equipment. The tools and parts are listed in the final chapter of the book, Chapter 15, Building a Robot Bartender in Logix.
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here:http://www.packtpub.com/sites/default/files/downloads/9781789532463_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText:Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles.Here is an example:"Mount the downloadedWebStorm-10*.dmgdisk image file as another disk in your system."
A block of code is set as follows:
(* IF THEN ELSEIF ELSE Example *)
if (TankLevel >= 50) then
Pump1Permissive [:=] 1;
elseif (TankLevel >= 100) then
Pump1Permissive [:=] 1;
Pump2Permissive [:=] 1;
else
Pump1Permissive [:=] 0;
Pump2Permissive [:=] 0;
end_if
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
(* CASE Example *)
case sequence_number of
1: StartPump [:=] 1;
OpenValve [:=] 1;
2: StartBlower [:=] 1;
3,4: StartMixer [:=] 1;
4..10: StartAuger [:=] 1;
else
StartPump [:=] 0;
end_case;
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Click on the Finish button, or in RSLogix 5000, click on OK."
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.