Sie sind auf Seite 1von 11

An Introduction to RSLogix5000 Tags

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. 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 ma.or 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 01) and other internal #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 )0 04 (5 Type )utput 0nput (tatus 2escription This file stores the state of output terminals for the controller. This file stores the state of input terminals for the controller. This file stores controller operation information useful for trou"leshooting controller and program operation. This file stores internal relay logic. This file stores the timer accumulator and preset #alues and status "its.

B6 T7 %5 ,8

Bit Timer

%ounter This file stores the counter accumulator and preset #alues and status "its. %ontrol This file stores the length& pointer position& and status "its for control instructions such as shift registers and se9uencers. 0nteger This file is used to store "it information or numeric #alues !ith a range of :65787 to 6578 . Floating This file stores a 3 !ith a range of 4.4757;77e:6 to 6.705 5677e<6 . $oint

N7

=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 # 04 04 F N7 Na e (tart (top (peed (etpoint Alarm %ode !ata Ty"e 0nput 0nput Floating $oint 0nteger

#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 File 3 )0 04 (5 Type )utput 0nput (tatus -se the >(? and ((? instructions to get status information such as the %$- time& module states and scan times. Assign the Boolean @B))LA data type to the tag. Assign the T0B/, data type to the tag. Assign the %)-NT/, data type to the tag. Assign the %)NT,)L data type to the tag. Assign the dou"le integer @20NTA data type to the tag. Assign the ,/AL data type to the tag. ,(Logix 5000

0nput and output modules& !hen configured& automatically create their o!n tags li+e Local:0:0.2ata.0

B6 T7 %5 ,8 N7 F

Bit Timer %ounter %ontrol 0nteger Floating $oint

#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 Na e gi#en to the tag has the follo!ing rules: only alpha"etic characters @A:C or a:*A& numeric characters @0:;A& and underscores @DA must start !ith an alpha"etic character or an underscore no more than 70 characters no consecuti#e or trailing underscore characters @DA not case sensiti#e

=hile tags are not case sensiti#e& it is good practice to mix cases for reada"ility. 0t is much easier to read Line4D(tart than L0N/4(TA,T or line4start. 0n 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 Na ed &or 'rou"ing Le#elDEigh Tags Not Na ed &or 'rou"ing EighDLe#el

Le#elDLo! 0nsertDNut FnifeD(top

0nsertDNut FnifeD(top Lo!DLe#el

-se the !escri"tion field for a longer description of the tag. 0t 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 pro.ect. The tag Ty"e defines ho! the tag operates in the pro.ect Base A tag that actually defines the memory !here the data is stored A tag that represents another tag (end data to another controller ,ecei#e data from another controller

Alias $roduced %onsumed

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 01) 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 Boolean

A((re)iation *e ory (its Range B))L 4 0:4 :45 to 457 48 65 :65&78 to 65&787 :5&477&7 6&87 to 5&477&7 6&877 <1:6.705 56/6 to <1: 4.4757;77/:6

(hort 0nteger (0NT 0nteger 2ou"le 0nteger 0NT 20NT

,eal Num"er ,/AL

65

Logix5000 controllers are true 65:"it controllers& meaning the memory !ords are 65:"its !ide. No matter !hat& a tag al!ays reser#es 65 "its of memory e#en if it is a Boolean or integer data type. For this reason& it is "est to use a 20NT !hen dealing !ith integers. Furthermore& a Logix5000 controller typically compares or manipulates #alues as 65:"it #alues @20NTs or ,/ALsA. 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 tagsA and therefore a#aila"le to all programs or local @program tagsA 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 Bessage @B(>A 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. Ba+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 Binary 2ecimal Eexadecimal )ctal /xponential Float

Base 5 40 48

Notation 53

483 3 0.0000000e<000 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 20NT tag this is the 65 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. 0f 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. ByTag.5A. (ho!n "elo! is the expanded structure for a T0B/,. Notice it is made of t!o 20NTs and three B))Ls. 0n this case& the Booleans are pac+ed into one 20NT and therefore a timer uses three 20NTs 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. 5. ,ight clic+ on the H and select ne! tag. 6. 2ou"le clic+ on the H and type in the tag name. 0f 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. Ba+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%. 5. 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 @-2TA and Add:)n 0nstructions. 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 Bon& 5007:40:45 07:5 . dear (ir& 0 ha#e many plcs @omron&mitsu"ishi&simmens&toshi"aA i need the soft!ear that reads all the o"o#e $L%'s . ,egards& Ale** Ca+ *any "eo"le ase a(out

(u"mitted "y Tim Goung on =ed& 5007:45:45 0;:5;. Bany 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 #erifiedA on Thu& 5044:40:57 00:40. =ith the exception of the AB Bicro 00 family that you can do!nload F,// soft!are for TEAT FAB0LG only @Bicro 00& 60 L soon to "e released 50A. 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 #erifiedA on (un& 500 :0;:47 0 :50. try o"en"lc @iec4464A this can do your .o" http://www.plcopen.org

.ad you got it/


(u"mitted "y Alex =ang @not #erifiedA on Thu& 500;:07:48 54:6;. Ead you got itH any +L#s
(u"mitted "y duggo4 @not #erifiedA on Bon& 5040:40:07 50:65.

!ouldn't !e all There is no single so&t%are


(u"mitted "y A:tac @not #erifiedA on Tue& 5044:07:05 46:5;.

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 #erifiedA on (at& 500 :07:58 45:48.

Actually 0 !ant a plc emulator soft!are for practice. (o ho! i get thisH It0s the sa e %ith a
(u"mitted "y Tim Goung on =ed& 500 :0 :08 4;:65.

0t'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 si ulator
(u"mitted "y L/L)( @not #erifiedA on Fri& 500 :0;:05 46:66.

i !ant it immediattlyMMMMMMMMMMMMMMMthan+sMMMMMMMM si ulador de "lc (u"mitted "y +erlin @not #erifiedA on Bon& 500 :0;:45 56:60. para hacer mis practicas de estudios y poder aplicarlos por 9ue es un "uen programa +L# si ulator
(u"mitted "y $,AB)2 F-BA, (0N>E @not #erifiedA on Tue& 5044:08:54 07:08.

$L% simulator is an electronic interfacing de#ice to simulate $L% 01) in different !ays li+e to ena"le or disa"le the signals "lc e ulator
(u"mitted "y Anonymous @not #erifiedA on (un& 5040:04:64 55:47.

!ere you a"le t get the emulator

-no%ledge
(u"mitted "y ,amchandra Fashali+ar @not #erifiedA on (at& 5044:0 :50 04:55.

0 am interested in learning $L% programming. A&ter years o& SL# and +L#51
(u"mitted "y masto @not #erifiedA on (un& 500 :40:05 45:0 .

After years of (L% and $L%5& 0 ha#e a !ee+ to get up to speed on logix5000. 0 ha#e to admit& i dont get the tagging....dohM ,xcellent %rite u"2 T.AN3
(u"mitted "y Anonymous @not #erifiedA on Thu& 5044:40:57 00:07.

/xcellent !rite upM TEANF G)- M

4Tags are the

ethod &or

(u"mitted "y %oo!alls+y @not #erifiedA on Fri& 5044:45:48 44:58. NTags 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. N N560 and F765 are not "hysical addresses8 They0re logical addresses8 $nly I and $ addresses are "hysical8 NThese 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.N A tag is simply an alphanumeric string that points to a location in memory. That's all. 0t is no different than the fact that data ta"le locations in $L%:51(L%5001BicroLogix 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 pre:assigned a name and structure in the $L%: 51(L%5001BicroLogix that doesn't afford renaming and doesn't allo! for the sym"ol associated !ith it @if usedA& 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. 0t !ould not "e programmatically or logically incorrect to refer to N7:5 or F :57 as a tag in a $L%:5.

'reat to hear &ro

so eone %ho actualy -no%s

(u"mitted "y 2on : 0ndustrial Training @not #erifiedA on (un& 5045:06:55 47:07. =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% @0/: %ontrollogix1,(Logix 5000A 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%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 re e (er

y &irst Reliance

(u"mitted "y d.! @not #erifiedA on Tue& 5045:05:04 45:5;. 0 remem"er my first ,eliance 2(. 0t !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 re e (er

y &irst Reliance

(u"mitted "y d.! @not #erifiedA on Tue& 5045:05:04 48:00. 0 remem"er my first ,eliance 2(. 0t !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 #erifiedA on Bon& 5045:07:48 46:55. (ir i m ne! user here.pl* su..est 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.. +L#de) 9 Tools &or +L# "rogra ing

(u"mitted "y =e"site )ptimi*ation %ompany @not #erifiedA on Thu& 5045:40:07 05:05.

Eey There. 0 found your "log using msn. This is an extremely !ell !ritten article. 0'll ma+e sure to "oo+mar+ it and return to read more of your useful info. Than+s for the post. 0 !ill definitely return.