An Introduction to RSLogix5000 Tags Tags Tags are the method for assigning and referencing refe rencing memory locations in Allen Bradley Logix5000 controllers. No longer are there any physical addresses such as N7:0 or F:7 !hich use sym"ols to descri"e them. These ha#e "een replaced !ith tags !hich are a pure text "ased addressing scheme. This is a departure from the more con#entional !ays of programming $L%s& !hich includes Allen Bradley's earlier line of $L%5 and (L% 500 controllers. )ne of the hardest transitions from the older systems is reali*ing ho! the tag data"ase !or+s. The person !ith experience in Allen Bradley systems !ill recogni*e many of the instructions and "e at home !ith the editor in ,(Logix 5000. -nderstanding the tag data"ase is the first maor hurdle in "ecoming comforta"le !ith the %ontrolLogix and %ompactLogix systems. (o let's dig in and get started.
The Way We Used To Be /arlier Allen Bradley $L%s programmed !ith ,(Logix 5 and ,(Logix 500 soft!are had data files to store 1) and other internal #alues. #alues . These different data files could only hold one data type. A data type defines the format and the si*e of the stored #alue. 2efault 2ata Files
2ata File 2escriptions File 3
Type
2escription
)0
)utp utput
This file file stor stores es the the sta state te of outp utput term termin inal alss fo for the the cont contro roll ller er..
4
nput
This fi file st stores th the st state of of in input te terminals fo for th the co controller.
(
(tat (tatu us
This file file stor stores es cont contro roll ller er oper operat atio ion n in inform format atio ion n use usefu full fo for tro trou u"les "lesho hoot otin ing g controller and program operation.
B6
Bit
This file stores internal relay logic.
T
Timer imer
This file file stor stores es the the time timerr accu accumu mula lato torr and and prese resett #alu #alues es and and stat statu us "its. its.
%5
%oun %ounte terr This This file file stor stores es the the cou count nter er accu accumu mula lato torr and and pres preset et #alu #alues es and and sta statu tuss "it "its. s.
,8
%ont %ontro roll This This file file stor stores es the the len lengt gth& h& poin pointe terr pos posit itio ion& n& and and stat status us "its "its for for con contr trol ol instructions such as shift registers and se9uencers.
N7
nteger
F
Floating This file stores a 3 !ith a range of 4.475;e6 to 6.067e<6. $oint
This file is used to store "it information or numeric #alues !ith a range of 6787 to 678.
=hile this method made it easy for using instructions& it pro#ided a challenge for logically grouping
different data types together according to function. For instance& in machine control& a motor may ha#e a start& stop& speed and alarm code each !ith its o!n data type. Thus& the data !as scattered throughout the data files. File #
Nae
!ata Ty"e
4
(tart
nput
4
(top
nput
F
(peed (etpoint
Floating $oint
N7
Alarm %ode
nteger
o"aring the $ld and Ne% The Logix5000 controllers ha#e done a!ay !ith data files and in its place is the tag data"ase. The tag data"ase organi*es memory locations in one place. /ach tag is assigned its o!n data type. The ta"le "elo! sho!s the association "et!een the current data types and the older systems !ith data files.
,(Logix 5 1 500
,(Logix 5000
File 3
Type
)0
)utput
4
nput
(
(tatus
-se the >(? and ((? instructions to get status information such as the %$- time& module states and scan times.
B6
Bit
Assign the Boolean @B))L data type to the tag.
T
Timer
Assign the T/, data type to the tag.
%5
%ounter
Assign the %)-NT/, data type to the tag.
,8
%ontrol
Assign the %)NT,)L data type to the tag.
N7
nteger
Assign the dou"le integer @2NT data type to the tag.
F
Floating $oint
Assign the ,/AL data type to the tag.
nput and output modules& !hen configured& automatically create their o!n tags li+e Local:0:.2ata.0
reating a Tag )ne !ay to create a ne! tag is right clic+ on the %ontroller Tags in the %ontroller )rgani*er and select Ne! Tag. /#en faster is the %trl<= hot +ey.
The follo!ing dialog "ox pops up.
The Nae gi#en to the tag has the follo!ing rules:
only alpha"etic characters @AC or a*& numeric characters @0;& and underscores @D must start !ith an alpha"etic character or an underscore no more than 0 characters no consecuti#e or trailing underscore characters @D not case sensiti#e
=hile tags are not case sensiti#e& it is good practice to mix cases for reada"ility. t is much easier to read Line4D(tart than LN/4(TA,T or line4start. n addition& the tag data"ase list sorts alpha"etically. Therefore& it is "est to use similar starting characters !hen you !ant tags to "e together in the monitor list.
Tags Naed &or 'rou"ing
Tags Not Naed &or 'rou"ing
Le#elDEigh
EighDLe#el
Le#elDLo!
nsertDNut
nsertDNut
nifeD(top
nifeD(top
Lo!DLe#el
-se the !escri"tion field for a longer description of the tag. t is "est to +eep names short yet not cryptic. Tag names are do!nloaded and stored in the controller "ut the description is not as it is part of the documentation of the proect. The tag Ty"e defines ho! the tag operates in the proect Base
A tag that actually defines the memory !here the data is stored
Alias
A tag that represents another tag
$roduced
(end data to another controller
%onsumed
,ecei#e data from another controller
Alias tags mirror the "ase tag to !hich they refer. =hen the "ase tag #alue changes so does the alias tag. -se aliases in the follo!ing situations: program
logic in ad#ance of !iring diagrams assign a descripti#e name to an 1) de#ice pro#ide a more simple name for a complex tag use a descripti#e name for an element of an array $roduced and consumed tags ma+e it possi"le to share tags "et!een controllers in the same rac+ or o#er a net!or+. This article does not co#er this aspect. (elect a !ata Ty"e for the tag "y typing it in or "y clic+ing on the ellipsis "utton and selecting it from the list. A data type is a definition of the si*e and layout of memory allocated for the created tag. 2ata types define ho! many "its& "ytes& or !ords of data a tag !ill use. The term Atomic 2ata Type refers to the most "asic data types. They form the "uilding "loc+s for all other data types.
!ata Ty"e
A((re)iation *eory (its Range
Boolean
B))L
4
04
(hort nteger (NT
4 to 47
nteger
NT
48
6&78 to 6&787
2ou"le nteger
2NT
6
&47&6&8 to &47&6&87
,eal Num"er ,/AL
6
<16.06/6 to <1 4.475;/6
Logix5000 controllers are true 6"it controllers& meaning the memory !ords are 6"its !ide. No matter !hat& a tag al!ays reser#es 6 "its of memory e#en if it is a Boolean or integer data type. For this reason& it is "est to use a 2NT !hen dealing !ith integers. Furthermore& a Logix5000 controller typically compares or manipulates #alues as 6"it #alues @2NTs or ,/ALs. A Logix5000 controller lets you di#ide your application into multiple programs& each !ith its o!n data. The Sco"e of the tag defines if a tag is glo"al @controller tags and therefore a#aila"le to all programs or local @program tags to a select program group. $ay careful attention to this field as creating it in the !rong area may lead to some confusion later on as to its location.
ontroller Tags are a#aila"le to all programs. Gou cannot go !rong using controller scoped tags unless you easily !ant to copy and paste programs. A tag must "e controller scoped !hen used in a essage @(> instruction& to produce or consume data and to communicate !ith a $anel?ie! terminal. +rogra Tags are isolated from other programs. ,outines cannot access data that is at the program scope of another program. Ea#ing program tags ma+e it easy to copy1paste programs and not ha#e to !orry a"out conflicting tag names. a+e sure though that no controller tags are named the same as program tags. Style is the form in !hich to display the tag "y default. The follo!ing ta"le pro#ides you !ith information on the "ase and notation used for each style.
Style
Base
Notation
Binary
3
2ecimal
40
Eexadecimal
48
483
)ctal
3
/xponential
0.0000000e<000
Float
0.0
,dit and *onitor Tags To edit existing tags select the Logic > Edit Tags menu item. A spread sheet li+e #ie! lets you create and edit tags.
%lic+ing the < sign next to a tag re#eals its structure. For a 2NT tag this is the 6 indi#idual "its that ma+e up the tag !hich !ill not "e of interest if you are using the tag as a num"er rather then indi#idual "its. f you do !ish to use the indi#idual "its then you can address them in this !ay: !ith the tag name follo!ed "y a period and then the "it position @e.g. yTag.5. (ho!n "elo! is the expanded structure for a T/,. Notice it is made of t!o 2NTs and three B))Ls. n this case& the Booleans are pac+ed into one 2NT and therefore a timer uses three 2NTs of memory.
An ,asier Way to reate Tags The easiest !ay to create tags is on the fly !hile programming. =hen an instruction is first used a H !ill indicate the need for a tag. There are three options at this point: 4. 2ou"le clic+ on the H and select an existing tag from the drop do!n "ox. . ,ight clic+ on the H and select ne! tag. 6. 2ou"le clic+ on the H and type in the tag name. f it does not all ready exist& then right clic+ on the tag name and select %reate Ne!TagName. Be careful !ith this method not to use spaces or special characters. The nice thing a"out all these methods is that ,(Logix5000 !ill automatically fill in the correct data type according to the instruction used. Another 9uic+ method is to drag and drop an existing tag to a ne! instruction. a+e sure to clic+ on the tag name rather than the instruction.
onclusion These are the "asics of tags. The ad#antages are: 4. Tags& if done right& create a le#el of documentation that is stored in the $L%. . The soft!are does an automatic house+eeping of memory locations. There's no more !orrying a"out physical addressing and memory conflicts. 6. (tructures can "e more easily put together "ased on function rather then data type. Ad#ance su"ects include arrays& user defined data types @-2T and Add)n nstructions. Eopefully& you !ill continue to learn more a"out the po!er of tags. There is no dou"t that if you grasp the principles presented here you !ill "e !ell on your !ay to using and trou"leshooting any Logix5000 controller. I Allen Bradley's $L% $rogramming Eand"oo+ upA Juic+ Tutorial on ,(Logix /mulator 5000 K
"lc so&t%ear (u"mitted "y ale**D*a+ on on& 0074045 07:5. dear (ir& ha#e many plcs @omron&mitsu"ishi&simmens&toshi"a i need the soft!ear that reads all the o"o#e $L%'s . ,egards& Ale** Ca+ *any "eo"le as- e a(out
(u"mitted "y Tim Goung on =ed& 00744 0;:;. any people as+ me a"out getting the programming soft!are for different $L%s. Gou'll ha#e to contact a local distri"utor& tal+ to their sales people and "uy the right pac+age for your needs. $L% soft!are is typically not free. With the exce"tion o& the AB
(u"mitted "y Anonymous @not #erified on Thu& 044407 00:40. =ith the exception of the AB icro 00 family that you can do!nload F,// soft!are for TEAT FALG only @icro 00& 60 soon to "e released 50. Also as+ your AB distri"utor for a %2 if you don't !ant to do!nload it.
any "lc (u"mitted "y an ager @not #erified on (un& 000;4 0:50. try o"en"lc @iec4464 this can do your o" http://www.plcopen.org
.ad you got it/ (u"mitted "y Alex =ang @not #erified on Thu& 00;048 4:6;. Ead you got itH any +Ls (u"mitted "y duggo4 @not #erified on on& 040400 0:65.
!ouldn't !e all There is no single so&t%are (u"mitted "y Atac @not #erified on Tue& 0440705 46:;.
There is no single soft!are program that !ill run all the different $L% types& or e#en all the $L%'s of a single manufacturer. Gou ha#e to get the soft!are for the specific manufacturer& family and #ersion of $L% you !ant to program. ,ulator (u"mitted "y Anonymous @not #erified on (at& 00078 4:48.
Actually !ant a plc emulator soft!are for practice. (o ho! i get thisH Its the sae %ith a (u"mitted "y Tim Goung on =ed& 00008 4;:6.
t's the same !ith a soft!are emulator in that you'll ha#e to tal+ to the #endor of the e9uipment. (ome manufacturers sell an emulator and some don't. "lc siulator (u"mitted "y L/L)( @not #erified on Fri& 000;05 46:66.
i !ant it immediattlyMMMMMMMMMMMMMMMthan+sMMMMMMMM siulador de "lc
(u"mitted "y +erlin @not #erified on on& 000;45 6:60. para hacer mis practicas de estudios y poder aplicarlos por 9ue es un "uen programa +L siulator (u"mitted "y $,A)2 -A, (N>E @not #erified on Tue& 044084 07:08.
$L% simulator is an electronic interfacing de#ice to simulate $L% 1) in different !ays li+e to ena"le or disa"le the signals "lc eulator (u"mitted "y Anonymous @not #erified on (un& 0400464 :4.
!ere you a"le t get the emulator
-no%ledge (u"mitted "y ,amchandra ashali+ar @not #erified on (at& 04400 04:5.
am interested in learning $L% programming. A&ter years o& SL and +L51 (u"mitted "y masto @not #erified on (un& 004005 4:0.
After years of (L% and $L%5& ha#e a !ee+ to get up to speed on logix5000. ha#e to admit& i dont get the tagging....dohM ,xcellent %rite u"2 T.AN3 (u"mitted "y Anonymous @not #erified on Thu& 044407 00:07.
/xcellent !rite upM TEAN G)- M
4Tags are the ethod &or (u"mitted "y %oo!alls+y @not #erified on Fri& 044448 44:8. 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 F:7 !hich use sym"ols to descri"e them. N60 and F76 are not "hysical addresses8 Theyre logical addresses8 $nly I and $ addresses are "hysical8
These ha#e "een replaced !ith tags !hich are a pure text "ased addressing scheme. This is a departure from the more con#entional !ays of programming $L%'s& !hich includes Allen Bradley's earlier line of $L%5 and (L% 500 controllers. A tag is simply an alphanumeric string that points to a location in memory. That's all. t is no different than the fact that data ta"le locations in $L%51(L%5001icroLogix controllers contain alphanumeric strings that point to locations in memory. There are N) differences "et!een a tag and a data ta"le address. Both are an alphanumeric string that points to a location in memory. The only difference is that the alphanumeric string is preassigned a name and structure in the $L% 51(L%5001icroLogix that doesn't afford renaming and doesn't allo! for the sym"ol associated !ith it @if used& to "e do!nloaded into the controller. Too many people are gettign hung up on !hat they percei#e or ha#e "een taught !ith respect to tags in ALL of these processors. t !ould not "e programmatically or logically incorrect to refer to N7: or F:7 as a tag in a $L%5.
'reat to hear &ro soeone %ho actualy -no%s (u"mitted "y 2on ndustrial Training @not #erified on (un& 04065 47:0. =ho actually +no!s and understands !hat they are tal+ing a"out. Ee is correct& Tags ust point to memory locations& ust li+e sym"ols al!ays ha#e. A $A% @/: %ontrollogix1,(Logix 5000 is ust the e#olution of the $L% more closer to computers& !here it has more memory and can store sym"ols1tags and !here the internal physical addresses are hidden "y higher le#el operating system and all you see and ha#e access to is the tag& ust li+e computers and !indo!s does. Also someone !as !anting more training on $L% @not $A%& see http:11!!!."in;5.com1Trou"leshooting$L%%ontrols(imulator.htm to gain years of trou"leshooting experience !ith $L% simulator in ust days. (ame site has $A% training %2 too& to introduce you to differences.
I ree(er y &irst Reliance (u"mitted "y d! @not #erified on Tue& 040504 45:5;. remem"er my first ,eliance 2(. t !as all tags in the early ;0's. ,oc+!ell "ought out ,eliance and years later AB is using !hat e#ery ,eliance programmer already +no!s ho! to do. (mall !orld. •
I ree(er y &irst Reliance (u"mitted "y d! @not #erified on Tue& 040504 48:00. remem"er my first ,eliance 2(. t !as all tags in the early ;0's. ,oc+!ell "ought out ,eliance and years later AB is using !hat e#ery ,eliance programmer already +no!s ho! to do. (mall !orld. •
in&o a(ut "lc "rograning (u"mitted "y monu @not #erified on on& 040748 46:5. (ir i m ne! user here.pl* suest me.i dont +no! a"ut any language."eco* language r not easily understooda"le for e#eryone.can anyone tell me !hich type of this plc language i m so confused..that !ill i ta+e admisson or not.this plc language is easily understand"le for me or not..pl* tell me anyone.. +Lde) 9 Tools &or +L "rograing (u"mitted "y =e"site )ptimi*ation %ompany @not #erified on Thu& 04400 0:0.
Eey There. found your "log using msn. This is an extremely !ell !ritten article. 'll ma+e sure to "oo+mar+ it and return to read more of your useful info. Than+s for the post. !ill definitely return.