Professional Documents
Culture Documents
L1LODL07 CreateLocalTags Labs
L1LODL07 CreateLocalTags Labs
Program Parameters
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 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.
Level 1: Logix - On Demand Creating Local Tags and Program Parameters
Hardware
To complete this lab, you will require the following hardware:
PC-based programming workstation with access to the RAcbi learning environment
Software
To complete this lab, you will require the following software:
Studio 5000 Logix Designer version 32
Files
To complete this lab, you will require the following files:
Machine_1_Lab07.ACD
Setup
To complete this lab, you will need to perform the following setup procedure:
1. Log on to your instance of the RAcbi learning environment.
1.b.
2. If you have NOT completed all labs up to this point in the Level 1: Logix - On Demand
course (e.g., you are just doing this individual lab as a refresher), then open the starting
file for this lab:
a. Use the shortcut on the desktop of your instance of the RAcbi learning
environment to open the LabFiles.
b. Open the Machine_1_Lab07.ACD file.
Logix Designer projects break logic down into tasks, programs, and routines. Tasks
provide a means of controlling how often and when our single logic processor core runs
our logic, thereby distributing the load on the processor core over time. Programs allow
us to encapsulate our logic and data. Routines are where we actually program the logic
and they not only provide control over when a routine runs, but also in which
programming language the logic is programmed.
By default, a new Logix Designer project contains a MainTask, a MainProgram, and a
MainRoutine. We may use these as-is, modify them, or delete them altogether. Of
course, we may also add other tasks, programs, and routines. For now, we will simply
use the default MainTask, MainProgram, and MainRoutine.
Local tags and program parameters exist at the program scope. Therefore, we begin
creating local tags and program parameters from within our MainProgram.
3. Go to the Controller Organizer of your project and, from within the Tasks folder,
expand the MainTask and MainProgram:
5. When the table opens, go to the bottom and select the Edit Tags tab:
The Edit Tags tab allows us to create and edit tags and program parameters, while the
Monitor Tags tab allows us to monitor the values currently stored within the tags and
program parameters.
The tag tables within the Logix Designer application may be customized to display the
information that the user wants to see. So, before we create any local tags or program
parameters, let’s modify the table to suit our purposes.
Because we are using program parameters rather than aliasing, let’s hide the columns
related to aliasing that we will not need to use.
6. Right-click the table header for the Alias For column and select Hide Column:
7. Repeat step 6 to hide the Base Tag column so that your table appears similar to the
following:
Our application calls for the control of two conveyors in a single production line. We
know that these conveyors will be controlled individually using pushbuttons that are
hard-wired to a digital input module. So, we require a Start input and a Stop input. We
also require a Motor On output to command the conveyor motor to run, and a Motor Off
output to command the conveyor motor to stop. At this point, we have not decided
whether we will use an across-the-line starter, a soft start, or a variable frequency drive.
However, it does not matter, as all three solutions require these two commands (Motor
On and Motor Off).
Since we intend on having multiple conveyors in this single assembly line program, we
will need to somehow distinguish between them. We could add a name that explains the
purpose of the conveyor (e.g., Start_Infeed and Start_Outfeed). However, in this
example, we will simply number them.
Furthermore, at some point in the future we would like to add similar control from a touch
screen Human Machine Interface (HMI). So, we will need to distinguish between
pushbutton inputs and HMI inputs.
Therefore, our local tags and program parameters should include the following:
Inputs Outputs
Start_PB_01 Motor_On_01
Start_PB_02 Motor_On_02
Stop_PB_01 Motor_Off_01
Stop_PB_02 Motor_Off_02
8. In the Program Parameters and Local Tags, double-click the Name cell of the first row
and type ‘Start_PB_01’:
When naming our tags, there are a few rules of which we need to be aware. These rules
stem from the IEC 61131-3 standard. When naming tags, we can:
Use up to 40 characters.
Use upper and lower case letters A through Z (tag names are NOT case sensitive).
Use numbers 0 through 9.
Use the underscore character (_).
NOT use spaces.
NOT use other characters.
NOT begin the tag name with a number.
9. Press the Tab key on your keyboard to advance to the next cell.
10. Click the dropdown arrow next to Local to reveal the Usage options:
A Local Tag usage stores data that may only be accessed from within the program
wherein the tag is created. An Input Parameter usage is similar to a Local Tag, with the
additional ability to be connected to a single controller tag or program parameter that is
sending data into the program. An Output Parameter usage is similar to a Local Tag,
with the additional ability to be connected to one or more controller tags or program
parameters that are receiving the data from the program parameter. So, to get
conditional data into the program, we could use the Input Parameter usage. To get
command data out of the program, we could use the Output Parameter usage.
In terms of our required local tags and program parameters, we see that the start and
stop pushbutton signals are all coming into the program. So, we should use the Input
Parameter usage. Whereas the motor on and off command signals to our motor control,
which are going out of the program, should be Output Parameter usage.
11. Select the Input Parameter Usage for the Start_PB_01 program parameter:
12. Press the Tab key on your keyboard to advance to the next cell.
The data types of our tags must suit the needs of the data being stored in the tags. In
the case of our conveyor control inputs, we are using momentary push buttons that have
but two states (i.e., open or closed). Therefore, the data required is a single bit, which
will allow for the open state (represented by a 0 value) and the closed state (represented
by a 1 value) of the pushbutton. In the Logix Designer application, a single bit of data
uses the Boolean (or BOOL) data type.
14. In the Select Data Type window that appears, type ‘BOOL’ into the search box, select
the BOOL data type, and click the OK button:
15. Press the Tab key on your keyboard to advance to the next cell.
Each tag or program parameter may include a description. This could be helpful to
technicians or other programmers who have to work with our logic in the future.
However, this description is tied to the data, so it should describe the data, rather than
how the data may be used with a particular logic instruction. Furthermore, this
description is displayed in our routines. So, to keep our logic clean and brief, the tag
descriptions should likewise be brief. In the case of our start signal, the data contains the
state of a normally open (NO), momentary pushbutton.
16. In the Description cell for the Start_PB_01 program parameter, type ‘NO Momentary’:
17. Click into the next (External Access) cell to store the description that you have entered.
The external access setting allows us to restrict access to data from outside
applications, such as an HMI. We will not restrict access to our data at this time.
18. Maintain the default External Access configuration of Read/Write:
19. Press the Tab key on your keyboard to advance to the next cell.
The constant setting allows us to define a constant value for a tag. In this case, our tag
is a variable that can be either a 0 or a 1, so we will leave this box unchecked.
20. Press the Tab key on your keyboard to advance to the next cell.
The style configuration allows us to control how a tag’s value is displayed (e.g., as
decimal, hexadecimal, binary). In the case of a Boolean value, this is somewhat
irrelevant, as any of the selections will display the same thing. However, later on, when
we start using integer data types, this setting can be quite useful.
21. Notice the asterisk at the front of our program parameter:
23. Continue adding to your Program Parameters and Local Tags until the table appears
as follows:
25. Save your project by clicking the save icon in the upper left corner of the project
window.