Studio 5000 Logix Designer Basic Lab Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 143

Important User Information

This documentation, whether, illustrative, printed, “online” or electronic (hereinafter “Documentation”) is intended for use only as a learning aid
when using Rockwell Automation approved demonstration hardware, software and firmware. The Documentation should only be used as a
learning tool by qualified professionals.

The variety of uses for the hardware, software and firmware (hereinafter “Products”) described in this Documentation, mandates that those
responsible for the application and use of those Products must satisfy themselves that all necessary steps have been taken to ensure that each
application and actual use meets all performance and safety requirements, including any applicable laws, regulations, codes and standards in
addition to any applicable technical documents.

In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter “Rockwell Automation”) be responsible or
liable for any indirect or consequential damages resulting from the use or application of the Products described in this Documentation.
Rockwell Automation does not assume responsibility or liability for damages of any kind based on the alleged use of, or reliance on, this
Documentation.

No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or software described in the
Documentation.

Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are responsible for:
• properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell Automation or third-party
provided instructions, warnings, recommendations and documentation;
• ensuring that only properly trained personnel use, operate and maintain the Products at all times;
• staying informed of all Product updates and alerts and implementing all updates and fixes; and
• all other factors affecting the Products that are outside of the direct control of Rockwell Automation.

Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell Automation is prohibited.

Throughout this manual we use the following notes to make you aware of safety considerations:

Identifies information about practices or circumstances


that can cause an explosion in a hazardous environment,
which may lead to personal injury or death, property damage, or economic loss.

Identifies information that is critical for successful application and understanding of the product.

Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or
economic loss. Attentions help you:
• identify a hazard
• avoid a hazard
• recognize the consequence

Labels may be located on or inside the drive to alert people that dangerous voltage may be present.

Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.

Rockwell Automation | 2021 2


Studio 5000 Logix Designer: Basic Lab

Contents
Before you begin ......................................................................................................................................... 5

About Studio 5000 Logix Designer .............................................................................................................. 6

About CompactLogix Controllers ................................................................................................................. 6

About Logix Controllers ............................................................................................................................... 7

GuardLogix Safety System .......................................................................................................................... 7

Section 1: Creating a Project ....................................................................................................................... 8


Launching Studio 5000 Configuration Software.............................................................................................................................. 8
Creating a New Controller Project .................................................................................................................................................. 8

Section 2: Adding Ladder Logic ................................................................................................................ 12

Section 3: Creating Tags for the Ladder Code .......................................................................................... 19

Section 4: Monitoring/Editing Tags ............................................................................................................ 27

Section 5: Configuring I/O ......................................................................................................................... 32


Adding ControlLogix I/O ................................................................................................................................................................ 32
Viewing the ControlLogix I/O Tags ............................................................................................................................................... 44
Assigning Alias Tags..................................................................................................................................................................... 46

Section 6: Connecting Your Computer to the Controller ........................................................................... 52


Launching FactoryTalk Linx Network Browser .............................................................................................................................. 52
Adding the AB_ETHIP (Ethernet/IP) Driver .................................................................................................................................. 52

Section 7: Downloading the Project from the Computer to the Controller ............................................... 57
In this section of the lab you will download the project. ................................................................................................................ 58

Section 8: Testing Your Logic Program ..................................................................................................... 62


Switching the Controller into Run Mode and Testing the Program ............................................................................................... 63

Section 9: Adding Logic and Tags Online ................................................................................................ 68


Adding a MOV Instruction to the Logic ......................................................................................................................................... 68
Adding a Timer to the Logic .......................................................................................................................................................... 71

Rockwell Automation | 2022 3


Testing Your Logic ........................................................................................................................................................................ 76

Section 10: Creating and Running a Trend...............................................................................................77


Creating and Running a Trend...................................................................................................................................................... 77

Section 11: Creating and Using User Defined Data Types (UDT) .............................................................83
Creating User Defined Data Types ............................................................................................................................................... 83
Add the UDT Tag to an Instruction ............................................................................................................................................... 86
Monitoring UDT Tags .................................................................................................................................................................... 89

Section 12: Exploring FactoryTalk Logix Echo ..........................................................................................90

Appendix A: Using Periodic Tasks .............................................................................................................94


Adding a Periodic Task ................................................................................................................................................................. 94

Appendix B: Creating an Add-On Instruction (AOI) ................................................................................101


Adding an AOI instruction ........................................................................................................................................................... 101

Appendix C: Using Logical Organizer .....................................................................................................109


Using the Logical Organizer........................................................................................................................................................ 109

Appendix D: Creating User-Defined Datatypes (UDT) ...........................................................................112

Notes ........................................................................................................................................................142

Rockwell Automation | 2022 4


Before you begin

About this lab


This session provides you with an opportunity to explore the Studio 5000 Logix Designer software and the ControlLogix
hardware platform. The session steps through creating a new project, programming, and downloading to a controller.

Tools & prerequisites


Studio 5000 Logix Designer
FactoryTalk Linx
Lab files located in C:\Lab Files\_1_Basics Logix\
Logix controller in one of the following forms (depending on the lab format):
A. ControlLogix 1756-L85E demo box (1756-L85E, 1756-OB16IEF, 1756-IB16IF, 1756-IF8I, 1756-OF8I)

B. ControlLogix hardware (same as above) with an HMI faceplate, all located in cloud (e.g. onCourse)

C. Emulated Logix controller (FactoryTalk Logix Echo) with an HMI faceplate – local or cloud-based (e.g. onCourse)

Rockwell Automation | 2022 5


About Studio 5000 Logix Designer

Studio 5000 software includes the Logix Designer application for the programming and configuration of Allen-Bradley
ControlLogix and CompactLogix programmable automation controllers. Logix Designer is the progression of RSLogix 5000
software, and will continue to be the package you use to program Logix5000 controllers for discrete, process, batch, motion,
safety, and drive-based systems. Logix Designer offers an easy-to-use, IEC61131-3 compliant interface, symbolic programming
with structures and arrays and a comprehensive instruction set that serves many types of applications. It provides ladder logic,
structured text, function block diagram and sequential function chart editors for program development as well as support for the
S88 equipment phase state model for batch and machine control applications.

About CompactLogix Controllers

CompactLogix: Perfect for smaller, machine-level control applications


Use CompactLogix for small to medium size solutions such as motion axes, I/O, and network connectivity. The 5370 and new
5380 CompactLogix controllers offer integrated dual Ethernet/IP ports that support Device Level Ring (DLR) topology or Dual IP
configuration (in case of CompactLogix 5380) and integrated motion on Ethernet/IP.

CompactLogix offers the following benefits:


• Ideal for small, to mid-size applications that require low axis motion and I/O point counts
• Offers support for Integrated Motion over EtherNet/IP™ for maximized scalability
• Provides support for Device Level Ring (DLR) network topologies to help increase network resiliency
• Removes the need for lithium batteries with built-in energy storage
• Includes up to a 2-GB secure digital (SD) card for fast program save and restore
• Offers a smaller form factor for maximized cabinet space
• Open socket capability allows support for Modbus TCP as well as devices such as printers, barcode readers and
servers
GuardLogix Safety Controllers Features:
• Provides integrated safety and integrated motion in a single controller
• Supports integrated safety up to SIL 3, PLe CAT 4

CompactLogix brings together the benefits of the Logix platform — common programming environment, common networks,
common control engine — in a small footprint with high performance. The CompactLogix platform is perfect for tackling smaller,
machine-level control applications, with or without integrated motion, with unprecedented power and scalability. CompactLogix
is ideal for systems that require standalone and system level control over EtherNet/IP, or DeviceNet. Think CompactLogix when
you need economical, reliable control.
Learn more at rok.auto/CompactLogix5380

Rockwell Automation | 2022 6


About Logix Controllers

ControlLogix: Perfect for high-speed, high-performance, multidiscipline control


ControlLogix brings together the benefits of the Logix platform — common programming environment, common networks, and
common control engine — to provide the high-performance your application requires in an easy-to-use environment. Tight
integration between the programming software, controller, and I/O reduces development time and cost at commissioning as
well as during normal operation.

ControlLogix offers the following benefits:


• Premier high-speed, high-performance control platform for multidiscipline control (sequential, process, drive, and
motion)
• Fully-redundant controller architecture provides bumpless switchover and high availability
• Wide range of communication options and analog, digital, and specialty I/O
• Select ControlLogix products are TUV-certified for use in SIL 2 applications

ControlLogix controllers support intensive process applications and provide fast processing of motion instructions in a single
integrated solution.
ControlLogix provides modular network communications that let you purchase only what you need. Interface using ControlLogix
communication modules via a ControlLogix gateway, without the need for a processor in the gateway chassis, or interface
directly to a ControlLogix controller.
The ControlLogix solution also provides time synchronization capabilities, which is particularly useful in first fault and process
sequencing applications.

GuardLogix Safety System

A GuardLogix controller is a ControlLogix controller that also provides safety control. The GuardLogix controller is used with a
safety partner to achieve SIL 3/PLe/Cat. 4. A major benefit of this system is that it is still one project, safety, and standard
together. The safety partner controller is a part of the system, is automatically configured, and requires no user setup.

Learn more at www.rockwellautomation.com/en-us/products/hardware/allen-bradley/programmable-controllers.html

Rockwell Automation | 2022 7


Section 1: Creating a Project

This lab section should take roughly 5 minutes to complete.

Launching Studio 5000 Configuration Software


In this section of the lab, you will launch the Studio 5000 software, which will allow you to configure and program a controller.

1. Double-click on the Studio 5000 icon on the Desktop to launch Studio 5000 software.

The Studio 5000 Splash Screen appears.

Creating a New Controller Project


In this portion of the lab, you will create an offline project using a Studio 5000 for a ControlLogix controller.

1. Select New Project under the Create section.

Rockwell Automation | 2022 8


2. When the New Project pop-up is displayed, select Logix and type ‘1756-L85E’ in the Search field.

3. Single-click select the 1756-L85E ControlLogix 5580 Controller

4. Type ‘Intro_Lab_Control_Project’ into the name field.

5. Press the Next button.

Rockwell Automation | 2022 9


6. When the Project Configuration window appears, fill it in as follows:

▪ Select V34
▪ Select 1756-A7 7-Slot ControlLogix Chassis
▪ Select Slot 0
▪ Select No Protection
▪ Add a project description ‘Logix Basic Lab’
▪ Click Finish

Rockwell Automation | 2022 10


Controller
Faceplate

Instructions
Tasks, Programs, toolbar
and Routines

Controller
Organizer User Defined and
Predefined Datatypes

I/O Configuration

Programming
area

Controller Organizer and


Logical Organizer Tabs

You have now created your first controller project!


Congratulations! You have completed this section.

Rockwell Automation | 2022 11


Section 2: Adding Ladder Logic

This lab section should take roughly 5 minutes to complete.

In this section of the lab you will add code for a simple motor start/stop seal-in circuit. You will experience the ease of
programming with Studio 5000 software. During the labs we will only utilize ladder logic programming, but Logix controllers
also can be programmed using function block, sequential function charts, and structured text. This allows selection of the
programming language that best fits an application.

You will continue to use the project already open.


Alternatively, you can start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_1.ACD

1. In the Controller Organizer expand the MainProgram folder by clicking on the arrow . Once expanded, the
MainRoutine will appear as shown below:

Rockwell Automation | 2022 12


2. Double-click the MainRoutine icon and maximize the ladder window if it is not maximized.
This will open the routine editor. An empty rung will already exist as shown below: The red color of the rung and the circled “x”
next to the rung indicate the rung is incomplete.

3. From the instruction toolbar, left click and hold on the Examine On (XIC) instruction.

4. Drag the XIC onto rung 0 until the green dot appears. Release the mouse button at the location you wish to
place your instruction.

Rockwell Automation | 2022 13


Verify your rung appears like the figure below:

5. From the instruction toolbar left-click and hold on the Examine Off (XIO) instruction.

6. Drag the XIO onto rung 0 to the right of the XIC instruction. Again a green dot will appear to the right of the XIC
instruction indicating where your new instruction will be inserted. Release the mouse button at the location you
wish to place your instruction.

Rockwell Automation | 2022 14


Verify your rung appears like the figure below:

Note - If you place an instruction in the wrong location on a rung, simply click and hold on the instruction
and drag it to the correct location.

7. From the instruction toolbar, left click and hold on the Output Energize (OTE) instruction.

8. Drag the OTE onto rung 0 to the right of the XIO instruction. Again a green dot will appear to the right of the XIO
instruction indicating where the OTE instruction will be inserted. Release the mouse button at the location you
wish to insert the instruction.

Rockwell Automation | 2022 15


Verify the rung appears as follows:

We will now add a branch around the XIC instruction.

9. Click on the XIC instruction to select it as shown below:

10. From the instruction toolbar click on the Branch instruction.


A branch will be inserted on the rung.

Rockwell Automation | 2022 16


11. Left-click and hold on the blue highlighted part of the branch and drag your selected leg of the branch to the
left side of the XIC instruction.

12. Place the branch over the green dot and release the mouse button.

13. From the instruction toolbar, left click and hold on the XIC instruction.

14. Drag the XIC onto your newly created branch until the green dot appears and release the mouse button.

Rockwell Automation | 2022 17


Verify that the entire rung appears like the figure below. If it does not, use what you have learned to make it match.

15. Save the program by clicking on the Save icon on the toolbar. This will save the program in the default
directory, which is C:\Users\Labuser\Documents\Studio 5000\Projects

As you can see the free form editing in Studio 5000 can help speed development. You do not have to place
an instruction and tie an address to it before you add the next instruction.

Congratulations! You have completed this section

Rockwell Automation | 2022 18


Section 3: Creating Tags for the Ladder Code

This lab section should take roughly 5 minutes to complete.

In this section of the lab, you will create the tags needed for the program. In older traditional PLCs, a physical memory address
identifies each item of data, for example N7:0. In Logix controllers, there is no fixed numeric format. Tags are used instead and
can be given any name.

What is a tag and why are they better?


A tag is a text-based name for an area of memory. By using a text-based system you can use the name of
the tag to document your ladder code and organize your data to mirror your machinery. For example you
could create a tag named North_Tank_Pressure. This helps to speed code generation and debugging. All
tag names are stored in the controller.

Continue to use the project already open.


Alternatively, you can start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_2.ACD
We will create 3 tags for the program: Motor_Start, Motor_Stop, and Motor_Run.

1. First create the tag Motor_Start. To do this, right-click on the ? of the first XIC instruction. It will be
highlighted blue. Select New Tag.

Rockwell Automation | 2022 19


A New Parameter or Tag window will appear.

New Parameter or Tag - When you create a tag there are several attributes for a tag. The main attributes
we are interested in for this lab are as follows:
Usage: Defines a Local Tag or a Parameter Tag. We will use Local.
Type: Defines how the tag operates within the project
Base: Stores a value or values for use by logic within a project
Alias: A tag that represents another tag
Produced: Send data to another controller
Consumed: Receive data from another controller
Alias For: Only applies when the tag “type” is Alias. Defines the tag which the alias tag will reference.
Data Type: Defines the type of data that the tag stores. Example: Boolean, Integer, Real, String, etc.
Parameter Connection: Shows and allows selection of the parameter connected to this tag.
Scope: Defines how the data is accessed in the project. It is either controller scoped, global data
accessible throughout the controller or program scoped, data accessible for a specific program.
External Access: Defines the access external applications (HMIs) will have with the tag.
Read/Write: External application can read and write to the tag.
Read Only: External application can only read the tag.
None: External application cannot read the tag or write to the tag
Style: Display the tag value has Binary, Octal, Decimal, or Hex.
Constant: If checked, that tag cannot be changed programmatically.
Sequence: Allows Equipment Phase input/output tags to be used with FactoryTalk Batch Server.
Open Configuration: Opens the configuration wizard for complex tags (MSGs, PIDs, etc)
Open Parameter Connection: Opens the Connection Configuration window.

Rockwell Automation | 2022 20


2. Enter the name “Motor_Start” and fill in the remaining fields as shown below.
Make sure the scope of the tag is MainProgram.

3. Click Create to accept and create the tag.


The rung will now look like the figure below.

Rockwell Automation | 2022 21


Next you will create the tag Motor_Stop.

4. Right-click on the “?” of the XIO instruction and select New Tag.

Again, the New Tag window will appear:

5. Enter the name “Motor_Stop” and other fields as shown below:

Rockwell Automation | 2022 22


6. Click Create to accept and create the tag.

Verify the rung appears like the figure below:

You will now create the tag Motor_Run.

7. Right-click on the ? of the OTE instruction and select New Tag.

The New Tag window will appear.

8. Enter the fields as shown below for “Motor_Run”:

Rockwell Automation | 2022 23


9. Click Create to accept and create the tag.
Your rung should now appear as shown below:

For the XIC instruction in the branch we do not have to create a tag. You will use the tag Motor_Run.

10. Left click and hold the mouse button over the tag Motor_Run on the OTE instruction.

11. Drag the Motor_Run tag to the XIC instruction until a green dot appears next to the “?” and release the mouse
button.

The rung should now appear as shown below. Notice the “X” next to rung 0 has disappeared and that the rung color is no
longer red. This indicates that the rung passes auto verification and no errors are present.

Studio 5000 software verifies each rung automatically to make programming easier!

Rockwell Automation | 2022 24


12. Verify the program by clicking on the Verify Controller icon on the toolbar.

You will see if there are any errors in the output window.

This is useful to locate errors or incomplete rungs in larger projects that may have hundreds or thousands of
rungs!
Note that the output windows displays a combination of errors, warnings and messages. There might be
thousands of lines in the output window when working with larger projects, so the three filtering buttons and
the Search field might become very useful

Feel free to explore the function of those controls.

Rockwell Automation | 2022 25


13. Close the MainRoutine by clicking the “X” located at the top right corner of the tab.

14. Save the program by clicking on the Save icon on the toolbar.

The tag database of Logix versus a traditional PLC’s fixed memory addresses help you create self-
documenting code. This means you do not have to use address descriptions or symbols to make code
easy to read.

Congratulations! You have completed this section

Rockwell Automation | 2022 26


Section 4: Monitoring/Editing Tags

This lab section should take roughly 6 minutes to complete.

In this section of the lab, we will review the Tag Monitor/Editor in Studio 5000. The concept of Controller, Parameter, and
Program Local tags will be covered.

You will continue to use the project already open.


Alternatively, you can start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_3.ACD

1. From the Controller Organizer double-click on Controller Tags.

Rockwell Automation | 2022 27


The tag Monitor/Editor window appears. Notice in the lower left corner of the window two tabs labeled Monitor Tags and Edit
Tags as shown below.

2. Click on the tab Edit Tags.

Monitor/Edit Tags Tabs


When the ‘Monitor Tags’ tab is selected the tag values are shown and new values can be entered. The tag
properties cannot be modified while on the Monitor Tags Tab.
When the ‘Edit Tags’ tab is selected, values are not shown. Instead, NEW tags may be created, and
existing tag properties may be modified.
If you are having difficulty creating tags or modifying tag properties, verify that the ‘Edit Tags’ tab is
selected.

Notice that there are no tags present even though you just created three tags. These tags were created
at the Program Scope.

Notice a field in the upper left corner of the Tag Editor window labeled Scope. Earlier in the lab we talked
briefly about Controller and Program scoped tags. Currently the selection is Intro_Lab_Control_Project,
which will show controller scoped tags.

Rockwell Automation | 2022 28


Data scope defines where you can access tags.
Controller-scoped tags are accessible by all programs. Parameters and Local Tags are typically
accessible only by the code within a specific program; Isolate portions of a machine or different stations into
separate programs. This lets you do the following:
- Provide isolation between programs and equipment phases
- Prevent tag name collisions
- Improve the ability to reuse code
Data Scoping
When you create a tag, you define it either as a controller tag (global data) or a program tag for a specific
program (local data).

Any program in the


controller can access
these tags

Only the program


containing the Local tags
can access them. Local
tags are also called
program scoped tags.

Local tags are isolated from other programs. Routines cannot access the Local tags of another program.
Thus you can re-use Local tag names across multiple programs.

Rockwell Automation | 2022 29


Note: There are four ‘parameter’ types. Parameters allow the sharing of local data directly between
separate programs. In previously Studio 5000 versions, we needed a controller tag to do this. Now that
parameter tags can share the data directly between programs, controller tags are no longer required. This
allows for flexible and modular programming, reuse of tag names in multiple programs, and allowing data to
be directly shared between those programs.
There are four parameter types shown below.

We will not go into greater detail in this lab. Parameters are covered in the advanced lab.

Click on the down arrow for the Scope selection box.

3. Select Programs → MainProgram

The Tag Editor now has switched views to the program level and you see the tags you created earlier.

Rockwell Automation | 2022 30


4. Close the Tag Editor by pressing the “X” located at the top right corner of Program Parameters and Local Tags
– MainProgram tab.

5. Save the program by clicking on the Save icon on the toolbar.

Congratulations! You have completed this section

Rockwell Automation | 2022 31


Section 5: Configuring I/O

This lab section should take roughly 10 minutes to complete.

We will now configure I/O for the project. To communicate with I/O modules you must add modules to the I/O Configuration
folder (also referred to as the I/O tree).

This part of the lab covers adding 1756 I/O using the equipment at your lab station or virtual chassis.

• 1756-IB16IF Digital Input Module


• 1756-OB16IEF Digital Output Module
• 1756-IF8I Analog Input Module
• 1756-OF8I Analog Output Module

Adding ControlLogix I/O


You will continue to use the project already open.
Alternatively, you can start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_4.ACD

1. In the I/O Configuration folder, right-click on 1756 Backplane and select New Module.

Rockwell Automation | 2022 32


2. The Select Module Type window appears. Type “IB16” in the search box.

3. Select the 1756-IB16IF module and click Create.

Module Configuration Wizard


Whenever you add an I/O module to the system you will go through the Module Configuration Wizard. The
Wizard allows you to step through the entire configuration needed for a module. You can access this
information later by double clicking on a module in the I/O Configuration folder or through the tag
monitor/editor.
With the Logix family, there are no more dip switches or jumpers needed to configure I/O modules. I/O
modules are configured with software. This saves time when setting up a system. The configuration for all
modules is part of the controller’s program and is downloaded to the module from the controller. This allows
for ease of installation or replacement if an I/O module fails.

Rockwell Automation | 2022 33


4. The new module window appears. Enter the Name Digital_Input and Slot 3 parameters as shown below.

5. Click on the Change... button.

Rockwell Automation | 2022 34


6. Notice the module is at series A and revision 1.

7. Click OK.

Electronic Keying – Keying determines what checks are performed between the controller configured I/O
tree and the module before an I/O connection is made. This helps guard against improper operation by
verifying the hardware matches with what is configured.
The following data is read and compared:
Vendor, Product Type, Catalog Number, Major Revision, Minor Revision.
The user may select one of the following module keying options during the initial module configuration:
- Exact Match – All of the parameters described above must match or the inserted module will reject the
connection.
- Compatible Module – The module determines if the settings are compatible. Generally, the IO module
checks the Module Type, Catalog Number, and verifies the revision of the hardware is equal to or
greater than that configured.
- Disable Keying – No keying used at all. This is not typically used.
Connection -- Input only modules use “Data”. Modules that include outputs use “Output”.
Data Format -- Determines the data structure for the tags that are associated with the module. With the
modules in this lab, the format used for digital input module is Timestamp Data.

Rockwell Automation | 2022 35


8. Click on the Connection tab to observe the Requested Packet Interval data. We will leave the default at 20
milliseconds.

Requested Packet Interval (RPI)


The Requested Packet Interval specifies the period at which data is updated to and from the module. RPIs
are configured in milliseconds. The range is .5ms to 750ms.

9. Click on OK to close the wizard.

Rockwell Automation | 2022 36


10. In the Select Module Type window, type in “OB16” into the filter box and select the 1756-OB16IEF module.

11. Click on Create. The new module window appears.

12. Fill in the name “Digital_Ouput” and select Slot 4.

13. Click Change…

Rockwell Automation | 2022 37


14. Enter the Revision as shown below.

15. Click on OK and then on Yes to “Change module definition” and close the Module Definition window.

16. Click on OK to close the New Module wizard.

17. In the Select Module Type window, type in “IF8” into the filter box and select the 1756-IF8I module.

18. Click on Create. The new module window appears.

Rockwell Automation | 2022 38


19. Fill in the name “Analog_Input” and select Slot 5.

Rockwell Automation | 2022 39


20. On the left side menu, under Channels select Ch00* to configure the analog module.

21. Select the Voltage radio button and select the Input Range: 0V to 10V.

22. Click OK.

Rockwell Automation | 2022 40


23. In the Select Module Type window, type in “OF8” into the filter box and select the 1756-OF8I module.

24. Click on Create. The new module window appears.

Rockwell Automation | 2022 41


25. Fill in the name “Analog_Output” and select Slot 6.

Rockwell Automation | 2022 42


26. From the left side menu, under Channels select CH00* to configure the analog module.

27. Select the Voltage radio button, and select the Output Range: 0V to 10V.

28. Click OK.

29. Close the Select Module Type dialogue.

Rockwell Automation | 2022 43


Viewing the ControlLogix I/O Tags
Now that we have configured I/O modules in the project, let’s take a look how that information is presented in Studio 5000.

You will continue to use the project already opened.

1. From the Controller Organizer double-click on Controller Tags.

If necessary, drag
column to the right to
increase the size of the
Tag Name field. This will
allow you to view the
entire Tag Name.

The tag editor window will appear.

Notice by looking in the upper-left corner of the tag editor that Controller Scope is selected. All I/O module tags are created in
the Controller Scope. Modules that reside within the controller chassis are called “Local”.

Rockwell Automation | 2022 44


FYI - I/O Address Format

2. Switch to Monitor Tags by clicking on the Monitor Tags tab.

The above entries are tag structures for the modules you added. They contain more tags than are actually
displayed. Note the arrow next to the tag name. This indicates that you can expand the tag structure to see
more information.

Rockwell Automation | 2022 45


3. Expand and explore the tags for the I/O modules by clicking the arrow icon .
• :C - Configuration tags hold the module configuration and are designated by a “:C” in the tag name.
• :I - Input tags have “:I” in the tag name.
• :O - Output tags have a “:O” in the name.

4. Save the program by clicking the Save icon in the toolbar.

Assigning Alias Tags


In this section of the lab you will learn about alias tags.
You will continue to use the project already opened.

Aliasing
An Alias tag lets you create one tag that represents another tag.
Both tags share the same value
When the value of one of the tags changes, the other tag reflects the change
Use Aliases in the following situations:
-Program logic in advance of wiring diagrams
-Assign a descriptive name to an I/O device
-Provide a simpler name for a complex tag
-Use a descriptive name for an element of an array

1. From the Controller Organizer double-click on MainRoutine.

The ladder editor appears as shown below:

Rockwell Automation | 2022 46


In the last part of the lab we added I/O modules to the project. Now it’s time to alias the tags in the program to the I/O modules.
This will connect the ladder logic to real world I/O points. All three Motor tags will be aliased to points on the digital input and
digital output module.

2. Right-click on the tag Motor_Start and select Edit ‘Motor_Start’ Properties.

The Tag Properties window for Motor_Start will appear. Currently the tag is defined as a Base tag.

3. Select Alias as a type and notice that the Tag Properties window changed.

Rockwell Automation | 2022 47


4. Click on the down arrow for Alias For.
The tag browser appears. The browser shows both Controller and Program Scope Tags. You will need to select your address
from controller scoped tags.

5. Uncheck the Show MainProgram tags checkbox to deselect program-scoped tags.

The view on the screen will change to view only your controller-scoped tags

Rockwell Automation | 2022 48


6. Expand Local:3:I by clicking on the arrow, scroll all the way down the tree and select Local:3:I.Pt[0].Data.
Note that you may need to expand/widen the Name column to see the entire tag name.

Rockwell Automation | 2022 49


Tag Properties will now appear as follows:

Motor_Start will now be aliased to Local:3:I.Pt[0].Data, which is the first input point on the 1756-IB16IF module.

7. Click OK to close and apply the changes to the tag Motor_Start.


Motor_Start has been aliased to Local:3:I.Pt[0].Data. This means that the tags are equivalent to one another in code.
It is much easier to understand Motor_Start than Local:3:I.Pt[0].Data.

Rockwell Automation | 2022 50


8. Using the previous steps, alias the remaining two tags.
▪ Motor_Stop = Local:3:I.Pt[1].Data
▪ Motor_Run = Local:4:O.Pt[0].Data

9. When you are finished the ladder code should appear as follows:

10. Save the program by clicking on the Save icon on the toolbar.

Congratulations! You have completed this section

Rockwell Automation | 2022 51


Section 6: Connecting Your Computer to the Controller

This lab section should take roughly 5 minutes to complete.

In this lab, we will learn to configure a driver in FactoryTalk Linx Network Browser. We will complete the following steps:
▪ Launch FactoryTalk Linx Network Browser
▪ Configure a communications driver

Launching FactoryTalk Linx Network Browser


In this section of the lab, you will launch FactoryTalk Linx Network Browser, which will enable you to configure the driver you
will use to communicate with the ControlLogix processor.

1. Minimize Logix Designer and then Double-click on the FactoryTalk Linx Network Browser icon
on the desktop to launch the communication software to bring up the FactoryTalk Linx Network Browser
window.

Adding the AB_ETHIP (Ethernet/IP) Driver


In this section of the lab, you will add the Ethernet/IP driver that you will use to communicate with your Logix processor.

Ethernet/IP driver is created automatically during the FactoryTalk Linx installation process. This means that
it is not necessary to create one.
The steps below show ow to create another Ethernet/IP driver, which might be necessary when
communicating with different networks.

2. Click the Configure Drivers button.

Rockwell Automation | 2022 52


The Configure Drivers dialog appears. As mentioned above, some drivers are created automatically with the installation of
FactoryTalk Linx, so there are already drivers configured on this lab. However, we are going to create a new driver. FactoryTalk
Linx allows multiple drivers to be used.

3. Click on the Add New button.

4. Change the name of the driver from the offered one to AB_ETHIP-LAB as shown and in the Discovery method
drop-down list select Broadcast.

Rockwell Automation | 2022 53


5. Click on the Advanced tab and in the list of Interfaces choose the one that has 192.168.1.<x> address shown.
Click OK.

Rockwell Automation | 2022 54


Note: If there is no Interface with IP address 192.168.1.<x> in the list, then:
Select Windows Default

Click on the General tab.


Select Remote Broadcast and fill 192.168.1.0 into IP Address and 255.255.255.0 into Subnet Mask:

Then click OK.


Note - FactoryTalk Linx offers two different methods of device discovery: Broadcast and Device list /
Range. The Broadcast method will automatically scan for any EtherNet/IP compatible devices on the
specified subnet. When using the Device List / Range method,FactoryTalk Linx will only scan for IP
addresses / IP address ranges that are defined in the list. You can have both types of drivers and/or
multiple instances of each type active in FactoryTalk Linx at the same time if needed.

6. Close the Configure Driver Dialog.

Rockwell Automation | 2022 55


7. Expand the AB_ETHIP-LAB, driver to see the Logix controller with IP 192.168.1.20.

Congratulations! You have completed this section.

Rockwell Automation | 2022 56


Section 7: Downloading the Project from the Computer to the Controller

The images below describe the parts of the different versions of lab station that you might work with:
A. ControlLogix 1756-L85E demo box

B. ControlLogix hardware with an HMI faceplate, all located in cloud (e.g. onCourse)

C. Emulated Logix controller (FactoryTalk Logix Echo) with an HMI faceplate – local or cloud-based (e.g. onCourse)

Rockwell Automation | 2022 57


In this section of the lab you will download the project.

This lab section should take roughly 5 minutes to complete.

You will continue to use the project already open.


Alternatively, you can start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_5.ACD

1. Maximize Logix Designer.

2. From the Communications menu, choose Who


Active.

The Who Active Screen appears.

Rockwell Automation | 2022 58


3. Expand the AB_ETHIP-1 driver and select the controller with IP address 192.168.1.20 by clicking on it.
Depending on your lab setup, this could be either a physical ControlLogix 5580 controller, or ControlLogix 5580 Emulator

(or Emulate controller, shown below)

Rockwell Automation | 2022 59


4. Click Download.

5. You will be asked to verify the download. Click Download again.


The project will then begin to download to your controller.

If your controller was in the RUN mode prior to the download, you may be prompted to return to the RUN
mode:

6. If the following prompt appears, click Yes to change the controller mode to Remote Run.

Rockwell Automation | 2022 60


At this point you will be online with the controller and the status LEDs on the controller faceplate in your project will mimic the
LEDs on your controller. In this case the green color represents run mode. Blue would signify program mode. Gray means not
connected to a controller.

Congratulations! You have completed this section.

Rockwell Automation | 2022 61


Section 8: Testing Your Logic Program

This lab section should take roughly 5 minutes to complete.

In this lab you will verify the operation of your program.

I/O Mapping
For the lab there are push buttons and lights. Depending on the lab format you use, these are
• either on the physical demo box,
• or within the FactoryTalk View client (HMI running on the desktop)

or
The push buttons and lights are mapped as follows:
Motor_Start = DI0
Motor_Stop = DI1
Motor_Run = DO0

Rockwell Automation | 2022 62


Switching the Controller into Run Mode and Testing the Program
You will continue to use the project already open.
Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_7.ACD
to controller

1. If not already in run mode, click the Controller Faceplate and select Run Mode.

Rockwell Automation | 2022 63


The controller will go into run mode.
• If looking at a physical unit, this can be verified by looking at the Run LED on the controller. It should now illuminate
green.

• If using Emulator, the status can be seen in FactoryTalk Logix Echo Dashboard
Open the Device Status pane [1] and expand the properties of emulator CLX5580_slot00 [2]:

The controller state can also be verified through Studio 5000 by viewing the controller faceplate.

Notice that the faceplate shows four controller status LEDs.

2. From the Controller Organizer expand the MainProgram by clicking on the arrow .

Rockwell Automation | 2022 64


3. Double-click on the MainRoutine to open the ladder editor.

You will now see the ladder logic. Notice the green power rails on both sides of the ladder. This indicates you are online and
the routine is executing.

Notice that the XIO instruction Motor_Stop is green. This means that this instruction is in the ‘true’ or ‘on’ state. This is
because the Motor_Stop pushbutton is not pressed.

Rockwell Automation | 2022 65


4. Press and hold the DI1 button for a few seconds (on the physical demo box or HMI faceplate)

This correlates to the XIO instruction for Motor_Stop. Notice the instruction is no longer green while the DI1 button is pressed,
because the instruction is no longer true.

5. Press button DI0 (Motor_Start).


The XIC instruction will become true and turn green. Motor_Run will energize (turn green) and the pilot light DI0 on the HMI will
illuminate. Notice that the Motor_Start XIC instruction only remains green while the DIO button is depressed and returns to a
non-highlighted state when DI0 is released.

6. Verify that output DO0 (Motor_Run) stays illuminated when you release pushbutton DI0 (Motor_Start).
The ladder logic you have just written is a simple 3-wire control or motor start/stop seal-in circuit.

Rockwell Automation | 2022 66


7. Press pushbutton DI1 (Motor_Stop) and verify that output DO0 (Motor_Run) turns off.

Congratulations! You have completed this section

Rockwell Automation | 2022 67


Section 9: Adding Logic and Tags Online

This lab section should take roughly 10 minutes to complete.

In this lab we will explore online editing. You will:


▪ Add a MOV instruction
▪ Add a timer to the logic and its execution will be based on the motor running
▪ Add ladder logic to reset the timer when the motor is stopped.

You will continue to use the project already opened.


Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_8.ACD
to controller

Adding a MOV Instruction to the Logic

1. Click on Rung 0 of the MainRoutine in the ladder editor.

2. Add a rung by clicking the rung button on the toolbar.

Rockwell Automation | 2022 68


3. Use the scroll buttons if necessary to scroll to the Move/Logical instruction group tab in the instruction toolbar.
Under the Move/Logical category tab, click and drag a MOV instruction to the new rung.

4. Double-click the ‘?’ by the source in the MOV instruction and select Local:5:I.Ch[0].Data by double-clicking the
tag. You might have to scroll down to find the Channel data tags.

Rockwell Automation | 2022 69


5. Double click the ‘?’ by the destination. Select Local:6:O.Ch[0].Data by double-clicking the tag.

6. The rung should look like the following.

Rockwell Automation | 2022 70


Adding a Timer to the Logic

1. Select rung 0. Right click in the blue highlighted area to the left of rung zero and select Start Pending Rung
Edits.

The ladder editor will now look similar to the following:

The rung with the lowercase ‘i’s on the power rails is the rung you will perform the edits on.

Rockwell Automation | 2022 71


2. Click the OTE instruction (on Rung 0) so it becomes highlighted.

3. From the Instruction Toolbar click on the Timer/Counter tab, click the Timer On (TON) icon.

A timer is inserted into the code to the right of the OTE instruction.

In Studio 5000 Logix Designer you can string output instructions together in series. Branches are not
required.

4. On the timer instruction right-click in the blue area next to the word Timer and select New Tag.

Rockwell Automation | 2022 72


The New Tag window appears. Notice that the Data Type is already set to TIMER. This is because you are creating a tag in
the timer instruction.

5. In the Name field enter ‘Timer’ then click Create.

6. Verify that the tag has been created in the timer instruction as shown below:

Rockwell Automation | 2022 73


7. Double-click on the 0 in the timer instruction next to the word Preset.

8. Enter a value of 32767.

In Logix the Timer Preset is a 32-bit DINT which means the maximum value for your timers can be:
2,147,483,647

9. Press Enter. The TON instruction should now appear as shown below.

The Preset value is now 32767 milliseconds (= 32.767 seconds). Leave the accumulated value set to zero. You are now ready
to verify the edits you made.

10. Click on the Finalize All Edits icon

Rockwell Automation | 2022 74


11. When asked to finalize all edits click on YES.

The ladder editor will now appear as follows:

Rockwell Automation | 2022 75


Testing Your Logic

1. Press the DI0 (Motor_Start) pushbutton.

2. Verify that DO0 (Motor_Run) illuminates and the Timer accumulator starts increasing.

3. Now, press pushbutton DI1 (Motor_Stop).

4. Verify that DO0 turns off and the Timer resets.

5. Turn (or Slide) the AI0 (or AIN0) potentiometer half way.

6. Verify that the AO0 (or AOUT0) meter reads approximately 5 Volts.

7. Turn (or Slide) the AI0 (or AIN0) potentiometer all the way to the right (MAX).

8. Verify that the AO0 (or AOUT0) meter reads 10 Volts.

Congratulations! You have completed this section

Rockwell Automation | 2022 76


Section 10: Creating and Running a Trend

This lab section should take roughly 6 minutes to complete.

In this Lab you will:


▪ Create a trend to watch a timer and an input to explore the built-in trending capabilities of Studio 5000

This will be done online with the program from the previous Lab.
Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_9.ACD
to controller

Trending
Basic trending in Studio 5000 allows you to view data sampled over a time period in a graphical display.
Data is sampled at a periodic rate that is configurable from 1 milliseconds to 30 minutes. Studio 5000 will
allow you to create a trend and save it as part of your project file.
Basic trending has these constraints: you can trend data elements of type BOOL, SINT, INT, DINT, and
REAL, you are also limited to sampling eight unique data elements in a single trend.

Creating and Running a Trend

1. From the Controller Organizer, under Assets, right click on Trends and select New Trend.

The New Trend window appears.

Rockwell Automation | 2022 77


2. In the Name field enter ‘My_Trend’’.

3. Click Next.
The New Trend Add/Configure tags window appears.

Rockwell Automation | 2022 78


4. Click on the Select tag drop down arrow and choose Local:5:I:Ch[0].Data. Click the Add button.

This will allow the trend to monitor the input from AI0.

5. Let’s also trend the timer accumulator value. The timer the tag was created in the Program Scope, so we must
select the MainProgram tags as shown below. Select the Select tag drop down arrow.

Now only the tags for the MainProgram are shown.

Rockwell Automation | 2022 79


6. Expand the Timer tag by clicking on the +.

7. Select Timer.ACC and then click the Add button. This will add the tag Timer.ACC to the Tags to Trend list.

8. Click on Finish.
The Trend window will now appear.

Rockwell Automation | 2022 80


9. Right click on the Trend graph background and select Chart Properties.

The RSTrendX Properties window will now appear.

10. Click on the X-Axis tab.

11. Change the Chart time range - Time span from Second(s) to Minute(s).

12. Click OK.

Rockwell Automation | 2022 81


13. Start the trend by clicking on the RUN button located toward the upper left of the Trend dialog box.

14. Press the DI1 pushbutton then push the DI0 and watch the trend capture the data of the Timer.ACC.

15. Try moving the AI0 slider input and verify that you see the trend recording the input:

By default, each tag will be independently scaled to its observed min/max values. If desired, the scaling
options can be changed under the chart properties - Y axis tab.
There are also other options in the trend properties such as a start and stop trigger and pen colors.

16. When you are finished investigating the trend, click Stop and close the trend window.

Congratulations! You have completed this section

Rockwell Automation | 2022 82


Section 11: Creating and Using User Defined Data Types (UDT)

This section should take about 10 minutes to complete.

This lab section covers creating and using custom data structures.
▪ Create a User Data Defined Type (UDT)
▪ Create a tag from a UDT
▪ Use the tag in an instruction
▪ Use the tag monitor/editor to see the tag

Creating User Defined Data Types


In this lab section you will create a custom User Defined Data Type (UDT).

What is a UDT and what is it good for?


A UDT is good for organizing related data into a single structure. A UDT allows a single tag to hold multiple
members. Each member can be given a unique name to describe the data it holds. The members are
accessed by the main tag name, followed by a period, followed by the member name.

Continue to use the project already open.


Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_10.ACD
to controller

1. Right-click Data Types under Assets in the Controller Organizer and select New Data Type…..

A new Data Type window will appear.

Rockwell Automation | 2022 83


2. Fill in the Name field with “Gallons_To_Liters” as shown.

3. Fill in the description field with “Holds gallons and the equivalent in liters” as shown.

4. Click on Add Member… and type in Gallons.

5. Double-click the Data Type field on the same row and type in REAL.

Rockwell Automation | 2022 84


6. Follow the same steps to enter the next row for Liters and REAL as shown.

7. Click Apply.

The window should appear as shown.

8. Click OK to close the window.

9. Double-click on Parameters and Local Tags under the MainProgram as shown to open the tag window.

Rockwell Automation | 2022 85


10. Select Edit Tags tab on the bottom.

11. On the blank row, type in “Gallons_to_Liters” for the tag name.

12. On the same row, select “Gallons_to_Liters” for the Data Type as shown and click OK.

13. Click on a different row or tag to make sure the tag is accepted. The data type column for the
Gallons_to_Liters tag will turn gray when it is accepted.

Add the UDT Tag to an Instruction

1. Double-click on the MainRoutine.

Rockwell Automation | 2022 86


2. Make sure the End rung is highlighted. Click on the insert rung icon to create a new rung.

3. Find the Compute/Math tab on the instruction tool bar and click on the MUL instruction.

Rockwell Automation | 2022 87


4. Double-click on the “?” in the Source A field of the MUL (multiply) instruction and select the
Gallons_to_Liters.Gallons tag.

Note: the Gallons_to_Liters tag will need to be expanded to select the Gallons member.

5. Enter ‘3.785’ for Source B (the conversion constant to convert gallons to liters).

6. Double-click on the “?” in the destination field and select the Gallons_to_Liters.Liters tag as shown.

Rockwell Automation | 2022 88


7. Click on the finalize edits button and click on Yes to accept the changes.

Notice that the values of the tags are shown on the instruction. The multiply instruction converts the number in gallons to
liters.

8. Click on the number 0 just below gallons, type “34” or any desired value, and press enter. Notice that the Liters
value updates automatically.

Monitoring UDT Tags

1. Double-click the Parameters and Local Tags under the MainProgram and expand the Gallons_to_Liters tag.
Notice the values are also shown here. Make sure to select the Monitor Tags tab.

2. The values for gallons can be modified directly in the monitor screen by changing the value in the Value column.
Change the gallons value and watch that liters updates to corresponding value.

The UDT allows associated data to be stored under a single main tag instead of using completely separate
tags. This makes it easier to keep track of data and keep it more organized. The UDT name itself can
document what the data is for.

Congratulations! You have completed this section

Rockwell Automation | 2022 89


Section 12: Exploring FactoryTalk Logix Echo

This lab section should take approximately 6 minutes to complete:


FactoryTalk Logix Echo is Rockwell Automation’s new controller emulation environment supporting the entire family of
ControlLogix 5580 controllers. The emulated chassis can support up to 17 controllers and allows you to use projects developed
in this environment to be executed on physical controllers (or vice-versa) without modification.
Let’s take a look at how it works!

1. Close Logix Designer and Save your project if prompted to do so.


2. Open FactoryTalk Logix Echo from the shortcut on your Windows desktop:

3. In the upper-left portion of the Echo interface, click the ‘hamburger’ icon to open the Devices menu:

Notice that you have the option to Add Controller manually or Add Controller from ACD. Select Add Controller
from ACD:

4. Navigate to C:\Lab Files\_1_Basics Logix\Completed Lab Files and open the Intro_Lab_11.ACD file.

Rockwell Automation | 2022 90


5. In the Add Controller dialog box, notice that the fields are now pre-populated with the data from the ACD file:

Click the Add button

6. Notice that a new controller now shows up as a Device in Logix Echo:

7. Exploring the Logix Echo interface further, on the right-side, you can see a vertical toolbar with buttons for various
functions.

o Click the Device Status button near the middle of the toolbar to open the Device Status pane, and
then
o Click the small triangle to the left of your Intro_Lab_Control_Project device to expand it:

Rockwell Automation | 2022 91


Notice that our emulated controller is in Remote mode with a Status of OK.

8. Leaving Logix Echo open, launch Studio 5000 from the desktop shortcut:
9. Select Open > Existing Project > Project File
10. In the Open Project dialog box, navigate to C:\Lab Files\ _1_Basics Logix\Completed Lab Files and double-click
Intro_Lab_11.ACD to open it (alternatively, you can open the project you previously saved):

With our ACD file opened, we now need to set the Communications Path to the Logix Echo controller we created previously.
11. Select Communications > Who Active from the menu bar. Expand the Ethernet, EmulateEthernet branch and
select our Logix Echo controller: 127.0.0.1, 9310-WED300ENT, Emulate 5580 Controller:

12. Click Download and then confirm again by clicking Download to download your project file to the Logix Echo
controller.
13. When the download operation completes, the controller will remain in Rem Prog mode.
Change the controller to Run Mode and confirm your change by clicking Yes when prompted:

Rockwell Automation | 2022 92


14. Switch back to the Logix Echo Dashboard (using Alt-Tab, or by clicking its icon on the Windows Taskbar). Notice that
the controller Device Status now shows the controller is in a Run state:

Notice that you were able to directly load an L85 Project to the Echo Controller without any modifications and now you
can interact with the emulated Echo L85 controller, just as if it was a physical L85 controller.

Congratulations! You have completed the Studio 5000 Logix Designer Basic lab! If
time permits, feel free to explore additional topics in the Appendices section below.

Rockwell Automation | 2022 93


Appendix A: Using Periodic Tasks

This lab section should take roughly 10 minutes to complete.

In this lab, we will learn to add and configure a periodic task and add a program and routine with some logic. This will also be
done while online with the controller. It will be shown that multiple tasks are running.

Continue to use the project already open.


Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files \Intro_Lab_11.ACD
to controller

Adding a Periodic Task

1. In the Controller Organizer, right-click on Tasks and select New Task.

The New Task window appears. In this window we can configure the properties of a task.

Rockwell Automation | 2022 94


2. Fill in the Window as shown.
Name – ‘My_Periodic_Task_50ms’.
Type - Periodic.
Period – ‘50.000’ ms

3. Click OK.

Logix controllers have three task types: Continuous, Periodic, and Event.
Continuous – Runs at the lowest priority of any task and can be interrupted by other tasks. The continuous
task is designated by a symbol with a circular arrow. There can be a maximum of 1
continuous task.
Periodic – Executes at regular intervals and can be assigned different priorities. It is designated by a blue
clock symbol. There can be multiple periodic tasks.

Event – Triggers on specific events. This allows code to execute as quickly as possible
when some event happens. For example, a counting instruction can quickly be executed whenever a
photeye turns on to get an accurate count of parts.

4. Right-click on the My_Periodic_Task_50ms folder, select Add and then select New Program….

Rockwell Automation | 2022 95


Tasks are divided into programs. Whenever a new task is added, a new program also needs to be created.
Multiple programs are allowed in each task, and the programs execute in order one at a time whenever the
task executes. Programs allow the code in a task to be visually organized in large applications.

5. Fill in the name ‘My_Push_Buttons_Program’ and click OK.

6. Expand the My_Periodic_Task_50ms folder.

7. Right-click on the My_Push_Buttons_Program folder and select Add and New Routine.

Routines are where the code resides. Different kinds of language routines can be created. The Logix
platform supports Ladder, Function Block Diagram, Structured Text, and Sequential Function Chart as the
types of routines that can be created.

Rockwell Automation | 2022 96


8. Fill in the window as shown.
Name – ‘My_Push_Buttons_Routine’
Description – ‘<Any desired description.>’
Type – Ladder Diagram
In Program or Phase –My_Push_Buttons_Program.
Assignment – None.

9. Click OK.

The controller organizer should look like the following.

Rockwell Automation | 2022 97


10. Right-click on My_Push_Buttons_Program folder and select Properties.

11. In the Program Properties window select the Configuration Tab.

12. For Main, select My_Push_Buttons_Routine as shown.

We have just defined a main routine that will automatically be called.

13. Click OK.

Rockwell Automation | 2022 98


The controller organizer should look like the following with an “I” indicating the main routine. There is only one main routine for
each program. Only the main routine runs by default. If no routine is selected as the main routine, then no routines will execute.
JSR (Jump To Subroutine) instructions are used to call other routines.

14. Double-click on the My_Push_Buttons_Routine to open the routine. It should look like the following.

15. Create the following two rungs using the lessons previously learned. Use input point 2 to drive output 2 and
input point 3 to drive output 3 as shown.

Rockwell Automation | 2022 99


16. Click on the Finalize All Edits in Program button -> Yes to accept the changes.

The screen should now look like the following.

17. Try pushing the DI2 and DI3 buttons. They should light up while pressed.

Notice that the motor start and stop buttons still work as they did before. This demonstrates that both
programs are running! The controller is running two tasks, one as “continuous”, and another as a 50ms
periodic task.

Note: Notice the ability to make many kinds of changes while the controller is running and controlling.
We did these changes while online with a ‘live’ controller that was currently controlling our ‘machine’.

18. Exit Logix Designer and optionally save your project if prompted to do so.

Congratulations! You have completed Appendix A lab

Rockwell Automation | 2022 100


Appendix B: Creating an Add-On Instruction (AOI)

This lab section should take roughly 15 minutes to complete.

In this lab, an AOI instruction will be added to the project. AOI’s cannot be created or modified online (although they can be
imported online). The AOI will be created offline, code added, and downloaded to the controller to see it execute.

Start with project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_12.ACD

Adding an AOI instruction

1. In the Logix Designer window, click the save icon -> yes to save the project and tag values, then Go Offline.

2. In the Controller Organizer, right-click on Add-On Instructions folder located under Assets folder and select
New Add-On Instruction.

The New Add-On Instruction window appears.

Rockwell Automation | 2022 101


3. Enter the name ‘My_Signal_Light’.

4. Click OK.

The Add-On Instruction Definition window appears. In this window we can configure the properties of the AOI.

5. Click on the Parameters tab.

The Parameters tab is where the inputs and outputs of the instruction are defined.
The Local Tags tab contain tags that are only used by the AOI for internal data storage.

Rockwell Automation | 2022 102


6. Fill in the following two parameters as shown below.
My_Signal_Input -- Input -- BOOL -- check Required (Req).
My_Signal_Output -- Output -- BOOL -- check Required (Req).

The required checkbox indicates a tag will need to be filled in on the instruction.

The usage INPUT means the AOI will operate on a copy of the tags data. OUTPUT means the AOI will copy the
result to the tag. There is also an INOUT usage, this passes tag by reference, and the tag is read from and written to
directly while the AOI executes.

Verify the window is as follows.

NOTE: Make sure to change the usage on My_Signal_Output to “Output”

7. Click Apply.

8. Click on the Logic Button.

The following Logic window appears (you can close the Add-On Instruction Definition window if it stays open).

Rockwell Automation | 2022 103


9. Add an XIC instruction with the tag My_Signal_Input and add two timers to a rung. The rung should appear as
follows.

10. Add a tag name to the left TON instruction by right-clicking on Timer ? and selecting New Local Tag as shown

11. Enter Timer1 on the new Add-On Instruction Parameter or Local Tag window that appears. Click OK.

Rockwell Automation | 2022 104


12. For Timer1, set the Preset to 500 and keep the Accum at 0 as shown.

13. Now add Timer2 to the remaining TON instruction and create it as a local tag as well.

14. Set Timer2 Preset to 1000 and the Accum to 0 as shown.

15. Add an XIO instruction of Timer2.DN as shown after the XIC My_Signal_Input instruction.

16. Add a second rung with an XIC of Timer1.DN and an OTE instruction of My_Signal_Output as shown.

We have finished creating the AOI definition and logic! We will now add the AOI into the program to have it flash a light.

AOI’s allow logic to be embedded into a single instruction. This allows new custom instructions to be tailored to the
specific application. This also allows code to be easily reused between applications since AOI’s can be imported and
exported.

Rockwell Automation | 2022 105


17. Open the My_Push_Buttons_Routine (Tasks > My_Periodic_Task_50ms > My_Push_Buttons_Program) and
add another rung as shown.

18. Click and drag the My_Signal_Light Instruction folder from the tree to the rung as indicated by the next two
pictures.

Rockwell Automation | 2022 106


19. Enter ‘My_Signal_Light_Tag’ into the My_Signal_Light field.

20. Right-click on the My_Signal_Light_Tag and select New “My_Signal_Light_Tag”

21. Click Create to create a new local tag.

The local tag being created is called the AOI’s backing tag. This is the tag the AOI uses to store its status and local
tag values.

Rockwell Automation | 2022 107


22. Add Local:3:I.Pt(4).Data as the input tag, and Local:4:O.Pt(1).Data as the output tag

The ladder logic should now look as follows.

23. Save the program and download it to the controller.

24. Toggle the DI4 input switch and watch what happens to the DO1 light.

Every time the DI4 input switch is on (turned right), the DO1 light blinks at a 500 millisecond rate.

Notice the remaining buttons still work as they did before!

AOI’s allow code to be encapsulated into a single instruction. This allows common code and functionality to be clearly
defined and easily reused. The AOI can be reused as many times as desired. Each AOI should typically have a
unique backing tag.

Congratulations! You have completed Appendix B lab.

Rockwell Automation | 2022 108


Appendix C: Using Logical Organizer

This optional lab should take roughly 5 minutes to complete.

The Logical Organizer will be used in this lab to group the code to model the demo box. This will demonstrate how the Logical
Organizer can be used to group code regardless of the layout of the Controller Organizer. In this case, we will model it after our
machine, the demo box. The Logical Organizer allows programs to be grouped in any manner desired, but grouping them by
machine physical or logical function is typical.

Continue to use the project already open.


Alternatively, you can start by downloading project file C:\Lab Files\_1_Basics Logix\Completed Lab Files\Intro_Lab_13.ACD
to controller

Using the Logical Organizer

1. Click on the Logical Organizer tab

By default, all of the programs in the Controller Organizer are shown as an ungrouped list. Only the programs, and not the
tasks, are shown. We can use the organizer to group the programs. We will typically use a “folder” object to group the
programs.

Rockwell Automation | 2022 109


2. To add a new folder, right-click on the Logical Model folder -> Add -> New Folder.

Notice that we can also add programs here as well as in the Controller Organizer. If we add a program here, the configure
window will allow us to pick which Controller organizer task the program is scheduled in.

3. Enter the name ‘My_Demo_Box’ and click OK.

4. Click and drag the MainProgram onto My_Demo_Box so that the MainProgram is grouped under the
My_Demo_Box folder.

Rockwell Automation | 2022 110


5. Do the same for My_Push_Buttons_Program to associate with My_Demo_Box.

Notice that the two programs we are using to run the demo box are now grouped together. Anyone looking at the Logical
Organizer will have a better idea that both programs are being used to run the demo box.

6. Click on the Controller Organizer and notice that the programs and tasks haven’t changed.

Notice that Logical Organizer layout does not affect code execution, but should provide a better idea how
programs are used to run the physical process. In general, grouping controller code parts in Logical
Organizer is used to model the physical or logical application.

Congratulations! You have completed Appendix C lab.

Rockwell Automation | 2022 111


Appendix D: Creating User-Defined Datatypes (UDT)

In this optional section of the lab, you will create a new User-Defined Datatype (UDT) and an Add-On Instruction.

You will be using the ACD file located in C:\Lab Files\_1_Basics Logix\ folder.

1. Open the ACD file named Logix_Basics_Lab_Demo_Project located in


C:\Lab Files\1_Basics Logix\ folder

2. Right-click on User-Defined in the Controller Organizer under Data Types and select New Data Type…

Rockwell Automation | 2022 112


A new Data Type window will appear.

3. Fill in the Name field with “UDT_Pump”.


4. Fill in the Description field with “Pump data” as shown.

Rockwell Automation | 2022 113


5. Click on Add Member… and type in Pump_start_cmd.
6. Double-click in the Data Type field on the same row and type in BOOL.

7. Follow the same steps to enter the next three rows of members as shown below.

The data type of the members of the User Defined Data Type do not have to be the same. The User
defined data type allows users to combine any of the existing data types.

8. Click Apply.

9. Notice the Data Type Size field is updated to reflect the new members.

Rockwell Automation | 2022 114


Next, we will create an Add-On Instruction.

Add-On Instructions allow code to be encapsulated into a single instruction. This allows common code and
functionality to be clearly defined and easily reused.
NOTE:
Add-On Instructions cannot be created or modified online. However, they can be imported while online.

10. Right-click on the folder Add-On Instructions under Assets and select New Add-On Instruction….

The New Add-On Instruction window appears.

Rockwell Automation | 2022 115


11. Enter the name ‘Pump_Startup’.
12. Click OK.
The Add-On Instruction Definition window appears. This is where we configure the properties of the AOI.

13. Click on the Parameters tab.

The Parameters tab is where the inputs and outputs of the instruction are defined and configured.

14. Enter Name, Usage, and Data types as shown below:

The Usage Input means the AOI will operate on a copy of the tag’s data. The Usage Output means the AOI
will copy the result of the operation to the tag.
There is also an InOut usage type, which passes a tag by reference. The tag is read from and written to
directly while the AOI executes.

Rockwell Automation | 2022 116


15. Check the Required (Req) checkbox for Pump_start_cmd, Reset, and Pump_ON.
16. Verify the window matches what is shown below.

The Required (Req) checkbox determines whether the parameter requires an argument.
To read more about the other columns in the Parameter tab, you can click the Help button.

17. Click Apply.


18. Click on the Local Tags tab.

The Local Tags tab is where tags are defined that are used by the logic within Add-On Instruction. The local
tags are not visible outside of the Add-On Instruction unless an alias parameter is defined.

Note: In this lab, we will create the local tags later, when we create the logic for the Add-On Instruction.

Rockwell Automation | 2022 117


19. Click the Scan Modes tab.

The Scan Modes tab provides access to optional scan mode routines. The Add-On Instruction logic routine
is executed when the EnableIn is true. However, there are three other modes that can be used to execute
the instruction. For each mode, you have the option to define a custom routine that can be programmed
specifically for that mode.

20. Click the New… button for Prescan routine.

Rockwell Automation | 2022 118


The New Scan Mode Routine window opens.

21. Verify that the Open Routine checkbox is checked. Then, click OK.

The new Prescan routine will open.

This is where you can define the Prescan routine.

Rockwell Automation | 2022 119


22. Click Delete for Prescan routine.
Note: We do not need a Prescan routine for this lab.

23. Click on the Logic button.


The following window appears.

Rockwell Automation | 2022 120


24. Click OK to close the Add-On Instruction Definition window.

25. Add an XIC instruction with the tag Pump_start_cmd to rung 0. The rung should appear as follows.

26. Add an Output Latch to rung 0 and enter the tag name ‘Pump_startup_process’.

Rockwell Automation | 2022 121


27. Right click on the Output Latch tag and select New Local Tag ‘Pump_startup_process’…

28. Click OK in the New Add-On Instruction Parameter or Local Tag window.

29. Add a new rung and add an XIC instruction with the tag Pump_startup_process.

Rockwell Automation | 2022 122


30. Add a TON timer to rung 1.
Note: The TON instruction can be found by selecting the Timer/Counter category.

31. Right-click in the Timer field of the TON instruction and select New Local Tag…

The New Add-On Instruction Parameter or Local Tag window will appear.

Rockwell Automation | 2022 123


32. In the Name field, enter ‘Pump_startup_delay’ as shown below. Then, click OK.

33. Double click in the Preset field of the TON instruction, and type ‘5000’ and press Enter.

34. Add a branch to rung 1 as shown below.

35. Add an XIC instruction to the branch, and set the tag to Pump_start_delay.DN as shown.

Rockwell Automation | 2022 124


36. Add an Output Energize instruction to rung 1 and set the tag to Pump_ON.

37. Add another rung to the Logic and add an XIC instruction. Set the tag to Reset.

38. Add an Output Unlatch instruction to the rung you just created and set the tag to
Pump_startup_process.
Your completed AOI should match what is shown below.

We have finished creating the AOI logic.

Rockwell Automation | 2022 125


39. Double-click on Pump_Startup under Add-On Instructions to open the Definition.

40. In the Add-On Instruction Definition window, click the Signature tab.

The Add-On Instruction Signature allows for the instruction to be uniquely identified and sealed, prohibiting
changes to the logic, rung comments, tag descriptions, and any instruction documentation.

Rockwell Automation | 2022 126


41. Click the Generate… button.

The Signature consists of an ID number and date/timestamp that identifies the contents of the Add-On
Instruction at a given point in time. Once generated, the instruction is sealed, preventing edits.
Note: The Generate button is enabled only when offline.

42. Click Yes in the Logix Designer confirmation window.

The ID and Timestamp are generated. Additionally, the Add-On Instruction icon now has a blue mark next
to it indicating the instruction is sealed.

Note: Your ID and timestamp will be different than what is shown in the screenshot below.

Rockwell Automation | 2022 127


43. Click OK to close the Add-On Instruction Definition.
44. Try to edit one of the tags in the Pump_Startup Add-On Instruction.

Notice the fields are grayed out and cannot be edited.

Rockwell Automation | 2022 128


45. Double click on Pump_Startup under Add-On Instructions to open the Definition again.
46. Click on the Signature tab.
47. Click the Add to History… button.

The Create History Entry window opens.

Rockwell Automation | 2022 129


48. Type in “Created AOI” and click OK.

The [Enter] Signature History [Description] field will update with the entry.

Rockwell Automation | 2022 130


49. Click the Remove… button to remove the seal.

50. Click Yes to confirm removing the signature.

Rockwell Automation | 2022 131


Notice the blue mark is removed from the Add-On Instruction icon, the Add to History button becomes grayed out,
the Generate button and Clear Signature History buttons become useable.

Rockwell Automation | 2022 132


51. Click the Change History tab.

The Change History tab shows the time and date that the Add-On Instruction was created as well as the
user identity. The date and time of the most recent edit is captured as well as the identity.

52. Click the Clear Identities button.


The Identities are removed from the Created and Edited fields.

Rockwell Automation | 2022 133


53. Click the Help tab.

In the Help tab, you can add additional text to describe the Add-On Instruction and preview the Instruction
Help.

54. Click OK to close the Add-On Instruction Definition.

We will now add the AOI into the main program.

Add-On Instructions allow logic to be encapsulated into a single instruction. AOIs provide an easy way to
reuse code within an application or import into another application.

Rockwell Automation | 2022 134


55. Open the Control_LAD program.

56. Scroll to the end of the program and add a new rung.
57. Right-click on the new rung and select Add Ladder Element…
58. In the Add Ladder Element window, scroll to find the Add-On folder and expand it.

59. Select the Add-On Instruction Pump_Startup and click OK.

Rockwell Automation | 2022 135


60. Click in the Pump_Startup field and enter ‘Pump_Startup_Tag’.
61. Right-click on the Pump_Startup_Tag and select New “Pump_Startup_Tag”.
62. Click Create to create a new tag.

You have just created the AOI backing tag.

Each Add-On Instruction requires a unique backing tag. The backing tag is used to store the AOI status and
local tag values.

63. Add Local:3:I:PT[3].Data as the tag for Pump_start_cmd, and Local:3:I:Pt[1].Data as the tag for Reset.

64. Add Local:4:O.Pt[3].Data as the tag for Pump_ON.

Rockwell Automation | 2022 136


65. Save the program. Then, click Offline and select Download.

66. Click Download to confirm.

Rockwell Automation | 2022 137


67. Click Yes to change the controller back to Remote Run mode.

68. Open the Control_LAD program and scroll to find the Pump_Startup instruction.

69. Right-click on the Pump_Startup instruction and select Open Instruction Logic.

Rockwell Automation | 2022 138


70. Press the DI3 input button.
Notice the pump startup process is initiated and the TON instruction begins counting up for 5 seconds.

After 5 seconds, the Pump_ON tag is set, and the DO3 output turns on.

71. Press the DI1 input button. This corresponds to resetting the process and the DO3 output is cleared.

Rockwell Automation | 2022 139


72. Close the Pump_Startup - Logic by clicking the ‘X’ as shown below.

73. Double-click on Logic under the Pump_Startup Add-On Instruction in the Controller Organizer.

Notice that the Add-On Instruction Logic is greyed out.

74. Press the DI1 input button.


Notice how the Logic does not reflect the current state of the tags. This is because the Data Context is set
to the Pump_Startup Definition.

Rockwell Automation | 2022 140


The Data Context is only displayed for Add-On Instruction routines. This control allows you to select a
specific instance of the Add-On Instruction to use for animating values. Selecting the <definition> allows you
to edit the logic but the logic will not be animated.

75. Click the drop down for Data Context.

76. Select Pump_startup_Tag (Main_Program).


Note: We only have one instance of the Pump_Startup Add-On Instruction in this project. However, if
multiple instances were used, they would all be listed in the Data Context drop-down.

The logic now shows the tag status and animation.

77. Press the DI1 input button to clear the process.

Congratulations! You have completed Appendix D Lab.

Rockwell Automation | 2022 141


Notes

Rockwell Automation | 2022 142


Rockwell Automation is a trademark of Rockwell Automation, Inc. Trademarks not belonging to Rockwell Automation are property of their respective companies.

Studio 5000 Logix Designer: Basic Lab Manual — August 2022


Copyright© 2022 Rockwell Automation, Inc. All rights reserved. Printed in USA.

Rockwell Automation | 2022 143

You might also like