alias and base tags; difference?

unsaint32

Member
Join Date
Oct 2012
Location
minneapolis
Posts
365
Can you help me differentiate alias tag and base tag?

1. Is "Alias For" tag same as "Alias" tag? If not, what is the difference?

2. I know that an alias tag is a human-friendly name for a physical memory location. But what about a base tag? I am attaching screen shots of RSLogix5000. One screen shot shows how to create a base tag called All_Stop. The other screen shot shows how to create an alias tag called Section_3_Run. Both names are human-friendly names. And why is that when I create a base tag, I don't need to indicate the physical memory location?

question_alias or base tag.jpg question_alias or base tag2.jpg
 
" Section_3_Run" tag is an "Alias For" the physical input located within Local Chassis (Rack), Slot 2, Point 0; the tag is referencing a hard input point and makes it easier to comprehend the functionality of the said physical input.
"All_Run" tag is a user created Boolen Data Type Base tag which resides strictly within the controller's memory and does not related to any existing physical system components.
 
Mssr. Madeline > Jean Valjean > 24601

Alias > Base Tag > Memory Location


The ControlLogix handles memory allocation completely transparent to the user; you never, ever address memory directly.

Alias tags are just a degree of indirection that allows you to use a tag name that is easier to understand than "Local:1:I.Data[0]".
 
"All_Run" tag is a user created Boolen Data Type Base tag which resides strictly within the controller's memory and does not related to any existing physical system components.

1. In the picture, the "All_Stop" tag has a description of "this is the line stop push button input." Doesn't that mean it is referring to a input terminal the push button is connected to?

2. Even if a base tag resides only within the controller, shouldn't it have a certain memory location such as a structured tags like T4:20/DN?
 
In the picture, the "All_Stop" tag is defined as a Controller-scope BOOL internal tag.

The description is just text somebody put in the box; just because it says 'this is an input pushbutton' doesn't mean anything. The tag is clearly a base tag, of BOOL type. It's not related to a Module tag, and it's not an Alias for something else.

It's common for folks to refer to boolean tags that are connected to Pushbutton objects on an HMI screen as "pushbuttons". Probably that's what you are seeing.

It can be a hurdle for novice users who are accustomed to physical memory or minimally structured memory, but ControlLogix tag names really are the lowest level that an application programmer can use.
 
When you save a file to your computer, do you worry about the physical address where it is stored on the hard drive? No, Windows abstracts the physical location into a name that we understand. Thus we have folders and filenames with names we get to pick.

The base tag is the original source for our data. For example, Local:2:I.Data.5 is a name that Rockwell came up with rather than requiring us to use a physical 32-bit memory address. That is our Base Tag. However we want a name that makes more sense to us for our application so we come up with "Leading_Edge_Limit" as an Alias For Local:2:I.Data.5.

Both names are stored in the controller. The description could actually be attached to either and you would see it displayed in the logic.

Alias tags are particularly useful for I/O since I/O has an automatically generated base tag name. An alias instead allows me to use names that make sense for my application.

If I create a timer, those names are not automatically generated. So my base tag for the timer can be named as I see fit. So an alias, while possible for a timer, is unnecessary.

Where in physical RAM that tag is located is unimportant to me. The abstracting that takes place behind the scenes makes that location irrelevant to me. All I care about is the name and the data stored in that tag.

This also allows the controller to change the physical location to optimize performance.

OG
 
1. In the picture, the "All_Stop" tag has a description of "this is the line stop push button input." Doesn't that mean it is referring to a input terminal the push button is connected to?

It may, by way of programming, somehow relate to a physical input (for example, set or reset depending on the status of the input) but it doesn't directly point to the input.

2. Even if a base tag resides only within the controller, shouldn't it have a certain memory location such as a structured tags like T4:20/DN?

The essence of 'tag based' variables is that the programmer is releived of absolute memory adresses. The 'Local' real world I/O has a fixed base location.

But, there are still 'relative' addresses. A member of an array has a physical location related to other members of the same array. A member of a structure/UDT has a physical relationship to other members of the structure/UDT.

An alias 'points' to the location of the 'base' variable but the programmers do not have access to (nor do they need) the details of how that is accomplished. 'It just works'
 
In the picture, the "All_Stop" tag is defined as a Controller-scope BOOL internal tag.

The description is just text somebody put in the box; just because it says 'this is an input pushbutton' doesn't mean anything. The tag is clearly a base tag, of BOOL type. It's not related to a Module tag, and it's not an Alias for something else.

It's common for folks to refer to boolean tags that are connected to Pushbutton objects on an HMI screen as "pushbuttons". Probably that's what you are seeing.

It can be a hurdle for novice users who are accustomed to physical memory or minimally structured memory, but ControlLogix tag names really are the lowest level that an application programmer can use.

I certainly am a novice, hence my head spinning. I just cannot wrap my head around to the idea of a tag with no memory location. Is the base tag used in function chart or function block programming then? Do you have any example of how such base tags are being used?

Thanks.
 
unsaint32....

...all that's been said, but adding the following very important snippets...

A Base tag has memory allocated for the storage of the data, an Alias tag does not. An alias tag does not contain any data, it simply redirects the access (read or write) to the tag that does contain the data.

You do see a value in the tag database windows in the programming software, but that value is coming from the base tag, it is the nature of the way alias tags work that when RSLinx fetches the data for an alias tag from the controller, the controller goes to the alias tag, sees that it is an alias tag, and is then redirected to get the data from the base tag.

Actually an alias tag can be an alias for another alias tag, which itself is an alias for a base tag. And it needn't stop there either. I've witnessed some horrendous code that has tag access weaving it's way through 3 or 4 levels of aliases... something which I would avoid doing at all costs.

Another thing that can happen, which can cause confusion to the unwary, is that 2 or more alias tags can be aliases for the same base tag... this is usually the result of sloppy or uninformed programming. Don't worry too much about it, as it all works, (because the alias tags don't contain any data), but to me it's ugly.
 
if you're still confused, maybe a picture will help ...

the figure below shows that when an input module was added to the project's I/O Configuration list, a bit/box was assigned to a certain terminal screw on that module ... the bit/box was given the address Local:1:I.Data.0 – which I've shown as a "tag" highlighted in yellow – and connected to the bit/box ...

you could think of the "tagname" Local:1:I.Data.0 as being something like the bit/box's "given" name – the name registered on its official birth certificate ... the name registered at the county courthouse ... the name on its Social Security account ... in simplest terms, Local:1:I.Data.0 is the "base tagname" of the bit/box – and that "base tagname" ain't never gonna change ...

but ...

if you're like most people, saying that full official tagname Local:1:I.Data.0 gets real old – real quick ... so suppose that you assign the bit/box ANOTHER name – a "nickname" – or a "street name" – or in technical terms, you could assign it an ALIAS ... suppose you decide to assign the alias "Switch_A" ... notice that you are NOT creating a new bit/box – you're just giving a handy name to the same original bit/box – which still bears the same old official tagname Local:1:I.Data.0 ...

no problems so far ... but ...

along comes Little Johnnie – the junior programmer ... he decides to assign yet another ALIAS tagname to the same old input bit/box ... he loves LUCY – and so he ties that new name to the base tagname Local:1:I.Data.0 ... (why? – why not?) ... it just happens ...

then just for kicks Little Johnnie goes a step further – and assigns the alias RICKY to the alias LUCY ... can he do that? ... yes ... he probably SHOULDN'T – but he can – and he does ...

then, caught up in the magic of the moment, Little Johnnie decides to assign the alias ETHEL to the alias Switch_A ... and somehow the alias FRED also gets assigned to the alias SWITCH_A ...

naturally what's "fun and games" for Little Johnnie will eventually become "blood, sweat, and tears" for the maintenance crew ...

notice that in the sample rung, Little Johnnie COULD have used the "base tagname" Local:1:I.Data.0 for the XIC instruction ... or he COULD have used the alias tagname SWITCH_A ... or he COULD have used the alias tagname LUCY ... or he COULD have used the alias tagname RICKY ... or he COULD have used the alias tagname FRED ... or he COULD have used the alias tagname ETHEL ...

in any one of those cases, the results would have been exactly the same ... the underlying reason is that there is STILL just ONE bit/box assigned to the input field device ... that SINGLE bit/box will have a status of ONE or of ZERO – regardless of whichever one of its alias (alternate) tagnames the programmer chooses to call it ...

so now the big question:

how can WE – as technicians trying to troubleshoot the system – possibly make sense out of Little Johnnie's wacky alias-of-alias-of-alias tagname assignments? ...

luckily (I prefer to say "blessedly") we have a handy little feature built into the RSLogix5000 Cross Reference tool ... just bring up ANY of the alias tagnames (Fred for example) and then click the "Tag Hierarchy" tab ... presto! ... the results are something like a "family tree" for all of the aliases – and how they're all connected ...

and be sure to notice that they all refer back to the "base tag" – which in this case is our old friend Local:1:I.Data.0 – shown highlighted in yellow at the top of the list ...

and here's a link that might be helpful ...

http://www.plctalk.net/qanda/showthread.php?p=330957&postcount=1

.

ALIASES.jpg
 
Last edited:
and another screen shot with a little more detail for the Tag Hierarchy tool ... reading each of the lines all the way across should help you understand the relationships between the "alias" tagnames and the "base" tagname ...

and notice how it's set up like an "outline" - or a "family tree" ...

.

TAG_HIERARCHY.PNG
 
Last edited:
this post is intended to show that a "base tag" is NOT required to be connected/assigned to a particular piece of hardware (for example: a screw terminal on an input or output module) ...

it also demonstrates how the RSLogix5000 tag listing is set up to show how aliases and base tags are inter-related with one another ...

in the figure below, Mutt has been created as a bit/box which has NO connection to either an INPUT terminal - or to an OUTPUT terminal ... (many programmers call this an "internal" bit assignment) ...

(1) notice in the tag listing that the line which defines Mutt is empty in the "Alias For" column – and also empty in the "Base Tag" column ... that's because Mutt IS a "base tag" ... specifically, Mutt is the official "county courthouse" (bedrock) BASE name for the bit/box we've just created ...

(2) notice that in the line for Sam, Sam is shown as an "Alias For" Mutt – and the "Base Tag" column lists Mutt as the "base tag" ...

(3) notice that in the line for Joe, Joe is shown as an "Alias For" Sam – and the "Base Tag" column lists Mutt as the "base tag" ...

(4) notice that in the line for Bob, Bob is shown as an "Alias For" Sam – and the "Base Tag" column lists Mutt as the "base tag" ...

(5) notice that in the line for John, John is shown as an "Alias For" Mutt – and the "Base Tag" column lists Mutt as the "base tag" ...

(6) notice that in the line for Mike, Mike is shown as an "Alias For" John – and the "Base Tag" column lists Mutt as the "base tag" ...

don't miss the fact that ALL of the tagnames shown here ALL refer back to Mutt – and that there is ONLY ONE SINGLE bit/box being shown ... we just have many "extra" names (aliases) for the same bit/box ...

note that this is NOT meant to be an example of good programming practices ... in fact, this is usually considered to be a rotten design ... but regardless of how the programmer wrote it, when you look at it step-by-step, it should all make sense ... if it doesn't, post again and we'll dig deeper ...

good luck with your project ...

.


BASE_NAMES.PNG
 
Ron, now I understand that a base tag can point to an internal bit as well as a hardware terminal, and an alias tag can point to pretty much any tag. It's been a great education for my transition from RSLogix 500 to 5000. Thank you so much!!
 
Don't worry too much about it, as it all works, (because the alias tags don't contain any data), but to me it's ugly.
I agree, ugly all the way through. Multiple aliases for the same memory location is the modern equivalent of the double-coil syndrome. Who thought that it could ever be an advantage?

Rockwell needs to add a new Option where you choose how many levels of Aliases you want to allow for the same tag. I would set mine to "1".
 
Last edited:

Similar Topics

Hi all. From looking at the controller tags list in Logix5000, how do I look at a local I/O base tag and see what alias tags are using it...
Replies
9
Views
4,232
Hey fellas, My question is about best practice for COP ladder instruction in RSL5k when aliases are involved. I'm dealing with some...
Replies
4
Views
3,802
A program I am working with has all its tags in the controller scope. The tags that needed meaningful names for SCADA consumption were aliased...
Replies
2
Views
3,053
This would likely pertain to any scenario but in case it matters, here's mine: I have an array of Dints representing alarm bits, (i.e...
Replies
8
Views
5,910
Hi. I'm using a Modbus ProSoft where I basically map data to a big INT array. Example, where GX_I_63HPU is a REAL, MNETC.DATA.WriteData[200] an...
Replies
21
Views
341
Back
Top Bottom