Book Image

Instant PLC Programming with RSLogix 5000

Book Image

Instant PLC Programming with RSLogix 5000

Overview of this book

RSLogix5000 is a user friendly IEC61131-3-compliant interface for programming the current generation of Rockwell Automation PLCs, which includes Ladder Diagrams (LD), Graphical Function Block Diagrams (FBD), Graphical Structured Text (ST), and Sequential Function Charts (SFC). Instant PLC Programming with RSLogix 5000 captures the core elements of PLC programming with RSLogix 5000 with a minimal investment of time. We will avoid getting into control theory and focus on condensing the information specific to RSLogix 5000. We have selected the key areas of RSLogix and provide a step-by-step approach to teaching them. This book start by follows the steps involved in creating a new RSLogix 5000 project and configuring racks, slots, and channels. Next, we will create routines using the various languages available in RSLogix 5000, troubleshooting and resolving issues we encounter along the way. Finally, we will dive into the advanced features, such as online changes, code generation, task management, and user-defined structures. You will also learn object-oriented PLC programming techniques using advanced features like user-defined types (UDTs) that improve the maintainability, uniformity, and readability of our routines. We also highlight the strengths and limitations of online changes and demonstrate techniques to maximize flexibility. You will learn everything you need to get up and running with RSLogix 5000 as well as best practices used by industry experts.
Table of Contents (7 chapters)

Configuring I/O modules (Simple)

In this recipe, we are going to configure an analog input card to monitor the open position of 4 valves (0 to 100 percent) based on their 4 to 20 ma signals.

Getting ready

In order to complete this exercise, you will need a Logix 5000-compatible rack, a PLC, and some compatible controller cards, or run RSLogix Emulate 5000.

How to do it...

  1. At the bottom of the Controller Organizer window, expand the I/O Configuration folder, right-click on the Backplane node, and select New Module... from the menu as shown in the following screenshot:

  2. Next, we will select the module that will be added to our rack. We will be adding a basic 8 channel analog input card. Expand the Allen Bradley Analog category and choose 1756-IF8.

  3. Now, we are presented with the New Module window where you can specify the name and description of the module. We will identify this module based on its rack and slot position—RACK01_SLOT01 as shown in the following screenshot:


    In our example, we use an easy-to-understand module name, RACK01_SLOT01. In a real-world environment where you will be referencing the module name frequently, you may want to use a shorter naming convention, like R01S01.

  4. After adding the new module, the Module Properties window is displayed (or can be opened by double-clicking on the module). The Module Properties window will allow us to configure the channel, calibrate the card, and modify the Requested Packet Interval (RPI) and alarm information of our analog input module.


    The RPI is the millisecond interval (0.2 ms to 750 ms) during which the CPU will request new I/O states from your I/O cards. The ControlLogix line of PLCs contains multiple CPU cores and is capable of executing multiple tasks simultaneously. Unlike previous generations of PLCs, the ControlLogix will scan its PLC logic and update I/O at the same time (asynchronous I/O updates). Therefore, it is possible for I/O values to change in the middle of your logic scan. More information on the way ControlLogix executes tasks can be found in the Rockwell publication Logix5000 Controllers Tasks, Programs, and Routines available at

  5. We will configure our analog input module's first channel (Channel 0) to be a typical 4 ma to 20 ma input by navigating to the Configuration tab and selecting an input range of 0 ma to 20 ma from the dropdown.

  6. Now, we will set the information in the Scaling group box to the following values:

    • High Signal: 20 ma

    • Low Signal: 4 ma

    • High Engineering: 100.0

    • Low Engineering: 0.0

  7. This process must be repeated for all the four channels. We can select and configure the three remaining channels by clicking on the small square buttons labeled 1, 2, 3, and following the same method.

  8. Finally, we will click on the OK button to save our module configuration.

How it works...

We have configured all four channels on our module to report our valve open positions from 0 to 100 based on a 4 ma to 20 ma signal. If a valve signal wire is disconnected, we will see that our channel will drop below 4 ma and a channel fault will be reported.

There's more...

Each card type will have its own configuration dialog, so take some time to learn the available cards and their configuration options.

Third-party modules

Logix 5000 supports a wide variety of third-party add-on modules. Most of these modules will need to be installed using an installer from the third-party company; however, in Version 20 of Logix 5000, many popular third-party modules are built into the product.