An Introduction To RSLogix5000 Tags - PLCdev

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

An Introduction to RSLogix5000 Tags | PLCdev

1 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

Search

Tools for PLC programming


Recent Posts

Home Products Tutorial Directory Glossary Recent Posts Contrib


PDF Electric and
Supply

An Introduction to RSLogix5000 Tags

Supplier of New and


Reman GE Fanuc
and Allen Bradley
PLC parts
www.pdfsupply.com
PLC Programming
Handbooks
Allen Bradley
Siemens
Modicon

Tags are the method for assigning and referencing memory locations in
Allen Bradley Logix5000 controllers. No longer are there any physical
addresses such as N7:0 or F8:7 which use symbols to describe them. These
have been replaced with tags which are a pure text based addressing
scheme. This is a departure from the more conventional ways of
programming PLCs, which includes Allen Bradleys earlier line of
PLC5 and SLC 500 controllers.
One of the hardest transitions from the older systems is realizing how the
tag database works. The person with experience in Allen Bradley systems
will recognize many of the instructions and be at home with the editor in

Popular Articles
PLC Timeline
Rockwell
Automation's
Retroincabulator!
PLC Basics

RSLogix 5000. Understanding the tag database is the first major hurdle in
becoming comfortable with the ControlLogix and CompactLogix systems. So
lets dig in and get started.

The Way We Used To Be

PLC Simulators
Cheap PLCs

Earlier Allen Bradley PLCs programmed with RSLogix 5 and RSLogix 500
software had data files to store I/O and other internal values. These

Navigation

different data files could only hold one data type. A data type defines the

Book reviews
Online books
Recent posts
About

format and the size of the stored value.


Default Data Files

RSS
Feed Me!

Firefox

and Thunderbird make it


easy to keep up on the
latest articles from PLCdev

User login
Username: *
Data File Descriptions
Password: *

File # Type

Description

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

2 of 14

Log in

O0

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

Output

Create new account


Request new
password

This file stores the state of output terminals for


the controller.

I1

Input

This file stores the state of input terminals for the


controller.

S2

Status

This file stores controller operation information


useful for troubleshooting controller and program
operation.

B3

Bit

This file stores internal relay logic.

T4

Timer

This file stores the timer accumulator and preset


values and status bits.

C5

Counter

This file stores the counter accumulator and


preset values and status bits.

R6

Control

This file stores the length, pointer position, and


status bits for control instructions such as shift
registers and sequencers.

N7

Integer

This file is used to store bit information or


numeric values with a range of -32767 to 32768.

F8

Floating Point This file stores a # with a range of


1.1754944e-38 to 3.40282347e+38.

While this method made it easy for using instructions, it provided a


challenge for logically grouping different data types together according to
function. For instance, in machine control, a motor may have a start, stop,
speed and alarm code each with its own data type. Thus, the data was
scattered throughout the data files.

File #

Name

Data Type

I1

Start

Input

I1

Stop

Input

F8

Speed Setpoint

Floating Point

N7

Alarm Code

Integer

Comparing the Old and New


The Logix5000 controllers have done away with data files and in its place is
the tag database. The tag database organizes memory locations in one
place. Each tag is assigned its own data type. The table below shows the
association between the current data types and the older systems with data

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

3 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

files.

RSLogix 5 / 500

RSLogix 5000

File #

Type

O0

Output

I1

Input

Local:0:I.Data.0

S2

Status

Use the GSV and SSV instructions to get status

Input and output modules, when configured,


automatically create their own tags like

information such as the CPU time, module states


and scan times.
B3

Bit

Assign the Boolean (BOOL) data type to the tag.

T4

Timer

Assign the TIMER data type to the tag.

C5

Counter

Assign the COUNTER data type to the tag.

R6

Control

Assign the CONTROL data type to the tag.

N7

Integer

Assign the double integer (DINT) data type to


the tag.

F8

Floating

Assign the REAL data type to the tag.

Point

Creating a Tag
One way to create a new tag is right click on the Controller Tags in the
Controller Organizer and select New Tag. Even faster is the Ctrl+W hot key.

The following dialog box pops up.

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

4 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

The Name given to the tag has the following rules:


only alphabetic characters (A-Z or a-z), numeric characters (0-9), and
underscores (_)
must start with an alphabetic character or an underscore
no more than 40 characters
no consecutive or trailing underscore characters (_)
not case sensitive
While tags are not case sensitive, it is good practice to mix cases for
readability. It is much easier to read Line1_Start then LINE1START or
line1start.
In addition, the tag database list sorts alphabetically. Therefore, it is best to
use similar starting characters when you want tags to be together in the
monitor list.

Tags Named for

Tags Not Named for

Grouping

Grouping

Level_High

High_Level

Level_Low

Insert_Nut

Insert_Nut

Knife_Stop

Knife_Stop

Low_Level

Use the Description field for a longer description of the tag. It is best to

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

5 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

keep names short yet not cryptic. Tag names are downloaded and stored in
the controller but the description is not as it is part of the documentation of
the project.
The tag Type defines how the tag operates in the project

Base

A tag that actually defines the memory where the data


is stored

Alias

A tag that represents another tag

Produced

Send data to another controller

Consumed

Receive data from another controller

Alias tags mirror the base tag to which they refer. When the base tag value
changes so does the alias tag. Use aliases in the following situations:
program logic in advance of wiring diagrams
assign a descriptive name to an I/O device
provide a more simple name for a complex tag
use a descriptive name for an element of an array
Produced and consumed tags make it possible to share tags between
controllers in the same rack or over a network. This article does not cover
this aspect.
Select a Data Type for the tag by typing it in or by clicking on the ellipsis
button and selecting it from the list. A data type is a definition of the size
and layout of memory allocated for the created tag. Data types define how
many bits, bytes, or words of data a tag will use.
The term Atomic Data Type refers to the most basic data types. They form
the building blocks for all other data types.

Data Type

Abbreviation Memory bits Range

Boolean

BOOL

0-1

Short Integer

SINT

-128 to 127

Integer

INT

16

-32,768 to 32,767

Double Integer DINT

32

-2,147,483,648 to
2,147,483,647

Real Number

REAL

32

+/-3.402823E38 to
+/-1.1754944E-38

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

6 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

Logix5000 controllers are true 32-bit controllers, meaning the memory


words are 32-bits wide. No matter what, a tag always reserves 32 bits of
memory even if it is a Boolean or integer data type. For this reason, it is
best to use a DINT when dealing with integers. Furthermore, a Logix5000
controller typically compares or manipulates values as 32-bit values (DINTs
or REALs).
A Logix5000 controller lets you divide your application into multiple
programs, each with its own data. The Scope of the tag defines if a tag is
global (controller tags) and therefore available to all programs or local
(program tags) to a select program group. Pay careful attention to this field
as creating it in the wrong area may lead to some confusion later on as to
its location.

Controller Tags are available to all programs. You cannot go wrong using
controller scoped tags unless you easily want to copy and paste programs. A
tag must be controller scoped when used in a Message (MSG) instruction, to
produce or consume data and to communicate with a PanelView terminal.
Program Tags are isolated from other programs. Routines cannot access
data that is at the program scope of another program. Having program tags
make it easy to copy/paste programs and not have to worry about
conflicting tag names. Make sure though that no controller tags are named
the same as program tags.
Style is the form in which to display the tag by default. The following table
provides you with information on the base and notation used for each style.

Style

Base

Notation

Binary

2#

Decimal

10

Hexadecimal

16

16#

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

7 of 14

Octal

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

8#

Exponential

0.0000000e+000

Float

0.0

Edit and Monitor Tags


To edit existing tags select the Logic > Edit Tags menu item. A spread sheet
like view lets you create and edit tags.

Clicking the + sign next to a tag reveals its structure. For a DINT tag this is
the 32 individual bits that make up the tag which will not be of interest if
you are using the tag as a number rather then individual bits. If you do
wish to use the individual bits then you can address them in this way with
the tag name followed by a period and then the bit position (e.g. MyTag.5).
Shown below is the expanded structure for a TIMER. Notice it is made of
two DINTs and three BOOLs. In this case, the Booleans are packed into one
DINT and therefore a timer uses three DINTs of memory.

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

8 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

An Easier Way to Create Tags


The easiest way to create tags is on the fly while programming. When an
instruction is first used a ? will indicated the need for a tag. There
are three options at this point:
1. Double click on the ? and select an existing tag from the drop
down box.
2. Right click on the ? and select new tag.
3. Double click on the ? and type in the tag name. If it does not
all ready exist, then right click on the tag name and select Create
NewTagName. Be careful with this method not to use spaces or
special characters.
The nice thing about all these methods is that RSLogix5000 will
automatically fill in the correct data type according to the instruction used.
Another quick method is to drag and drop an existing tag to a new
instruction. Make sure to click on the tag name rather then the instruction.

Conclusion
These are the basics of tags. The advantages are:
1. Tags, if done right, create a level of documentation that is stored in
the PLC.
2. The software does an automatic housekeeping of memory locations.
Theres no more worrying about physical addressing and memory
conflicts.
3. Structures can be more easily put together based on function rather
then data type.
Advance subjects include arrays, user defined data types (UDT) and Add-On

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

9 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

Instructions. Hopefully, you will continue to learn more about the power of
tags. There is no doubt that if you grasp the principles presented here you
will be well on your way to using and troubleshooting any Logix5000
controller.
Allen Bradley's PLC
Programming Handbook

up

A Quick Tutorial on RSLogix


Emulator 5000

Printer-friendly version

( categories: Allen Bradley

Programmable Logic Controllers )

plc softwear
Submitted by alezz_zak on Mon, 2007-10-15 07:58.
dear Sir,
I have many plcs (omron,mitsubishi,simmens,toshiba)i need the softwear
that reads all the obove PLC's .
Regards,
Alezz Zak

Many people ask me about


Submitted by Tim Young on Wed, 2007-12-12 09:29.
Many people ask me about getting the programming software for
different PLCs. You'll have to contact a local distributor, talk to their
sales people and buy the right package for your needs. PLC software is
typically not free.

With the exception of the AB


Submitted by Anonymous (not verified) on Thu, 2011-10-27 00:10.
With the exception of the AB Micro 800 family that you can
download FREE software for THAT FAMILY only (Micro 800, 830 &
soon to be released 850). Also ask your AB distributor for a CD if
you don't want to download it.

many plc
Submitted by jan jager (not verified) on Sun, 2008-09-14 08:50.

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

10 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

try openplc (iec1131) this can do your job


http://www.plcopen.org

Had you got it?


Submitted by Alex Wang (not verified) on Thu, 2009-04-16 21:39.
Had you got it?

many PLCs
Submitted by duggo1 (not verified) on Mon, 2010-10-04 20:35.
:) wouldn't we all :(

There is no single software


Submitted by A-tac (not verified) on Tue, 2011-07-05 13:29.
There is no single software program that will run all the different PLC
types, or even all the PLC's of a single manufacturer. You have to get
the software for the specific manufacturer, family and version of PLC
you want to program.

Emulator
Submitted by Anonymous (not verified) on Sat, 2008-07-26 12:16.
Actually I want a plc emulator software for practice.
So how i get this?

It's the same with a


Submitted by Tim Young on Wed, 2008-08-06 19:32.
It's the same with a software emulator in that you'll have to talk to the
vendor of the equipment. Some manufacturers sell an emulator and
some don't.

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

11 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

plc simulator
Submitted by LELOS (not verified) on Fri, 2008-09-05 13:33.
i want it immediattly!!!!!!!!!!!!!!!thanks!!!!!!!!

simulador de plc
Submitted by kerlin (not verified) on Mon, 2008-09-15 23:30.
para hacer mis practicas de estudios y poder aplicarlos por que es un
buen programa

PLC simulator
Submitted by PRAMOD KUMAR SINGH (not verified) on Tue,
2011-06-21 07:06.
PLC simulator is an electronic interfacing device to simulate PLC I/O
in different ways like to enable or disable the signals

plc emulator
Submitted by Anonymous (not verified) on Sun, 2010-01-31 22:14.
were you able t get the emulator

knowledge
Submitted by Ramchandra Kashalikar (not verified) on Sat, 2011-08-20
01:52.
I am interested in learning PLC programming.

After years of SLC and PLC5,

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

12 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

Submitted by masto (not verified) on Sun, 2008-10-05 12:08.


After years of SLC and PLC5, I have a week to get up to speed on
logix5000. I have to admit, i dont get the tagging....doh!

Excellent write up! THANK


Submitted by Anonymous (not verified) on Thu, 2011-10-27 00:07.
Excellent write up! THANK YOU !

"Tags are the method for


Submitted by Coowallsky (not verified) on Fri, 2011-12-16 11:26.
"Tags are the method for assigning and referencing memory locations in
Allen Bradley Logix5000 controllers. No longer are there any physical
addresses such as N7:0 or F8:7 which use symbols to describe them. "
N7:0 and F8:7 are not physical addresses. They're logial addresses. Only I
and O addresses are physical.
"These have been replaced with tags which are a pure text based
addressing scheme. This is a departure from the more conventional ways of
programming PLCs, which includes Allen Bradleys earlier line of
PLC5 and SLC 500 controllers."
A tag is simply an alphanumeric string that points to a location in memory.
That's all. It is no different than the fact that data table locations in
PLC-5/SLC500/MicroLogix controllers contain alphanumeric strings that
point to locations in memory.
There are NO differences between a tag and a data table address. Both are
an alphanumeric string that points to a location in memory.
The only difference is that the alphanumeric string is pre-assigned a name
and structure in the PLC-5/SLC500/MicroLogix that doesn't afford renaming
and doesn't allow for the symbol associted with it (if used), to be
downloaded into the controller.
Too many people are gettign hung up on what they perceive or have been
taught with respect to tags in ALL of these processors. It would not be
programmatically or logically incorrect to refer to N7:28 or F8:27 as a tag
in a PLC-5.

Great to hear from someone who actualy knows


Submitted by Don - Industrial Training (not verified) on Sun,

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

13 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

2012-03-25 17:04.
Who actually knows and understands what they are talking about. He is
correct, Tags just point to memory locations, just like symbols always
have. A PAC (IE: Controllogix/RSLogix 5000) is just the evolution of the
PLC more closer to computers, where it has more memory and can store
symbols/tags and where the internal physical addresses are hidden by
higher level operating system and all you see and have access to is the
tag, just like computers and windows does.
Also someone was wanting more training on PLC (not PAC), see
http://www.bin95.com/Troubleshooting-PLC-Controls-Simulator.htm to
gain years of troubleshooting experience with PLC simulator in just
days. Same site has PAC training CD too, to introduce you to
differences.

I remember my first Reliance


Submitted by djw (not verified) on Tue, 2012-05-01 15:59.
I remember my first Reliance DS. It was all tags in the early 90's.
Rockwell bought out Reliance and years later AB is using what every
Reliance programmer already knows how to do. Small world.

I remember my first Reliance


Submitted by djw (not verified) on Tue, 2012-05-01 16:00.
I remember my first Reliance DS. It was all tags in the early 90's.
Rockwell bought out Reliance and years later AB is using what every
Reliance programmer already knows how to do. Small world.

info abut plc prograning


Submitted by monu (not verified) on Mon, 2012-07-16 13:52.
Sir i m new user here.plz sujjest me.i dont know abut any language.becoz
language r not easily understoodable for everyone.can anyone tell me
which type of this plc language i m so confused..that will i take admisson or
not.this plc language is easily understandble for me or not..plz tell me
anyone..

5/12/2015 2:35 PM

An Introduction to RSLogix5000 Tags | PLCdev

14 of 14

http://www.plcdev.com/an_introduction_to_rslogix5000_tags

PLCdev | Tools for PLC programming


Submitted by Website Optimization Company (not verified) on Thu,
2012-10-04 02:02.
Hey There. I found your blog using msn. This is an extremely well written
article.
I'll make sure to bookmark it and return to read more of your useful info.
Thanks for the post. I will definitely return.

Home Allen Bradley's PLC Programming Handbook


Terms of Use | Privacy Policy | About PLCdev | Contact Us | Write for us
Copyright 2005-2015 plcdev.com

5/12/2015 2:35 PM

You might also like