RSLogix 5000 Multiple Aliases to Same Tag

davidc100

Member
Join Date
Nov 2013
Location
Home
Posts
3
Reading A-B documentation I see conflicting info on the use of multiple aliases to same tag and nested aliases (alias to an alias).

Integrated Architecture:Foundations of Modular Programming (Publication Number IA-RM001C-EN-P) in section A4.2 Double Aliasing, declares this as good practice.

Logix5000 Controller Design Considerations in Chapter 3 says when assigning aliases, avoid:
• Nesting aliases.
• Using multiple aliases to the same tag.
On upload, the software decompiles the program and uses the physical memory addresses to determine which tags are
referenced in the code. All references to a base tag reverts to an alias if one exists. If multiple aliases point to the same
tag, RSLogix 5000 software uses the first alias tag (alphabetically) that it finds.

I created a project with both multiple and nested aliases, and then uploaded to an empty project. All aliases and values appeared correct.

Any advise on this?

Thanks,
David
 
What it says... avoid both.

Ignore the IAF "good practice"... that must have been written by someone who has never had to find a fault in the code at 3 a.m.
 
Multiple & Double Aliasing...

davidc100 said:
Reading A-B documentation I see conflicting info on the use of multiple aliases to same tag and nested aliases (alias to an alias).

Integrated Architecture:Foundations of Modular Programming (Publication Number IA-RM001C-EN-P) in section A4.2 Double Aliasing, declares this as good practice.

Logix5000 Controller Design Considerations in Chapter 3 says when assigning aliases, avoid:
• Nesting aliases.
• Using multiple aliases to the same tag.
On upload, the software decompiles the program and uses the physical memory addresses to determine which tags are
referenced in the code. All references to a base tag reverts to an alias if one exists. If multiple aliases point to the same
tag, RSLogix 5000 software uses the first alias tag (alphabetically) that it finds.

I created a project with both multiple and nested aliases, and then uploaded to an empty project. All aliases and values appeared correct.

Any advise on this?

Thanks,
David


I think there is a mix up here in both terminology and aliasing methods.
Using Multiple Aliases to one tag is not the same as using Double Aliasing.

This is my understanding of aliasing and its different methods. While not an exhaustive explanation of all of its uses, these are the main principles of use, as intended by Rockwell Automation.

"An alias tag is a tag that references memory defined by another tag".

To expand...

An alias tag is a copy of a controller base tag, a program base tag, or another alias tag using a different name, but using the very same data in memory as the original tag.

Alias Tag types:

You can create...

Controller-Scoped Alias Tags to Controller-Scoped Base Tags

Or...

Program-Scoped Alias Tags to Controller-Scoped Base Tags

Or...

Program-Scoped Alias Tags to Controller-Scoped Alias Tags
(This is Double Aliasing)

You cannot create...

Controller-Scoped Alias Tags to Program-Scoped Base Tags

Or...

Program-Scoped Alias Tags in one Program to Program-Scoped Base Tags in another Program

Knowing that...

Double Aliasing - As recommended in Integrated Architecture: Foundations of Modular Programming (IA-RM001C-EN-P)

First Part - Controller-Scoped Aliasing

This aliasing method allows you to assign Controller-Scoped Alias Tags to Controller-Scoped Base Tags, such as I/O. This then allows you to assign your own tag names to the raw base tag names.

Example: Controller Scope

Alias Tag type: Controller-Scoped Alias Tag to Controller-Scoped Base Tag

Controller Alias Tag: _10B5 <<< user defined tag name
Controller Base Tag: Local:2:I.Data.0 <<< raw tag name

You can, of course, simply assign a description to the base tag itself, so you will see the address of an instruction as "Local:2:I.Data.0" and the description above it as "_10B5". However, and as stated in the good practice guidelines, if you need to follow a particular specification, or naming convention, then the above facilitates this. Another common method to achieve similar results is to use "I/O Mapping", or "Buffer I/O".

So for the above example, when you address an instruction to the alias tag "_10B5" you will only see "_10B5" over the instructions in your Programs, and not the base tag of "Local:2:I.Data.0".

This is assuming you have the following Display setting turned OFF:

Tools>Options...>Workstation Options>Ladder Editor>Display>Instruction Display>Show Tag Alias Information

If this setting is turned ON, then the base reference tag is displayed directly above the instruction as "<Local:2:I.Data.0>", with the < > indicating aliasing, and the alias tag name "_10B5" above that. Any further descriptions are above that again.

This is now half way to implementing Double Aliasing.

Second Part - Program-Scoped Alias Tags to Controller-Scoped Alias Tags

Next you can create a Program-Scoped Alias Tag which references the Controller-Scoped Alias Tag created above.

Example: Program Scope

Alias Tag type: Program-Scoped Alias Tag to Controller-Scoped Alias Tag

Program Alias Tag: Push_Button <<< user defined alias tag name
Controller Alias Tag: _10B5(C) <<< user defined alias tag name

Here the Program-Scoped Alias Tag "Push_Button" references the same memory as the Controller-Scoped Alias Tag "_10B5",
which is the value in memory for the Controller-Scoped Base Tag "Local:2:I.Data.0".

Note in RSLogix 5000, under the "Alias For" and "Base Tag" columns, that the "_10B5" and "Local:2:I.Data.0" have a "(C)" appended.
This denotes Controller-Scoped reference tags.

This may seem like nesting aliases, or even multiple aliasing of the same base tag, but it is not. As the assumed nesting occurs between the Controller Scope and the Program Scope, this is allowed. They refer to this as Double Aliasing - perhaps not the best term to use, as it can be easily confused with multiple aliasing?

Multiple Programs, within the same application, can reference the same Controller-Scoped Alias Tag, or Base Tag, to uniquely defined Program-Scoped tags within each of those Programs.


Nesting and Multiple Aliasing - As referred to in Logix5000 Controller Design Considerations (1756-RM094H-EN-P)

Nesting Aliasing - Creating an Alias Tag of another Alias Tag at the Controller or Program Scope

Here you are advised to avoid creating an Alias Tag of another Alias Tag that will both reside at the same Scope. This goes for Controller-Scoped, or Program-Scoped Alias Tags.

Example: Program-Scoped Alias Tag to Program-Scoped Alias Tag in the same Program

Program-Scoped Alias Tag 1: "1st_Alias_Tag" <<<Alias to Controller-Scoped Base Tag "Local:1:I.Data.0"
Program-Scoped Alias Tag 2: "2nd_Alias_Tag" <<<Alias to Program-Scoped Alias Tag 1 "1st_Alias_Tag"

Here the existing Program-Scoped Alias Tag "1st_Alias_Tag" was already set up to reference a Controller-Scoped Base Tag "Local:1:I.Data.0". A second Program-Scoped Alias Tag "2nd_Alias_Tag" was created referencing the "1st_Alias_Tag". Updating instructions that unnecessarily duplicate the referencing of base tags adds to the scan-time, not to mention some confusion. To reference the same Controller-Scoped Base Tag "Local:1:I.Data.0" more than once in the same Program is unnecessary. All references to "Local:1:I.Data.0" should be done, in the same Program, using the "1st_Alias_Tag" only.

Multiple Aliasing - More than one Alias Tag at the Program Scope referencing the same Controller Base or Alias Tag

This is similar to Nesting, except that unrelated Alias Tags, created at the same Program Scope, reference the same Controller-Scoped Base or Alias Tag.

This, similarly to Nesting, is to be avoided because when using Multiple Aliases, referencing the same Base Tag, RSLogix 5000 software will alphabetically use the first Alias Tag that it finds, ignoring the other(s).

In short...

You can create a Program-Scoped Alias Tag to reference a Controller-Scoped Alias Tag without breaking the Nesting rule, but do not Nest Alias Tags under Alias Tags within the same Controller or Program Scope as each other.

Do not create Multiple Alias Tags, within the same Controller or Program Scope, to reference the same Base Tag, but Multiple Programs, within the same application, can create Alias Tags referencing the same Base Tag.

I hope that all makes sense?

Regards,
George
 
Last edited:
Multiple & Double Aliasing
+1

Oh wow comprehensive answer

Practically this is what I do:
Controller Alias to Controller scoped Tag - Especially for IO (Electricians & Engineers always move IO)
Program Alias to Controller scoped Tag (Alias or base) This allows me to develop code that is portable - (set up the alias tag when the import occurs)

Try to only ever have one alias at a particular scope
 
George,

Thank you very much. After reading your answer, I re-read the source material paying close attention to the distinctions in scoping and it made perfect sense.

Thanks again for a remarkably clear explanation.

Regards,
David
 
+1

Oh wow comprehensive answer

Practically this is what I do:
Controller Alias to Controller scoped Tag - Especially for IO (Electricians & Engineers always move IO)
Program Alias to Controller scoped Tag (Alias or base) This allows me to develop code that is portable - (set up the alias tag when the import occurs)

Try to only ever have one alias at a particular scope

How do you decide what tags to configure as a Controller Alias Tag or as a Program Alias Tag?
 
+1

Oh wow comprehensive answer

Practically this is what I do:
Controller Alias to Controller scoped Tag - Especially for IO (Electricians & Engineers always move IO)
Program Alias to Controller scoped Tag (Alias or base) This allows me to develop code that is portable - (set up the alias tag when the import occurs)

Try to only ever have one alias at a particular scope

I do the same thing. One alias per tag scope group, however multiple programs may have their own program scoped alias to a controller scoped tag.

Never had any problems doing this.
 
How do you decide what tags to configure as a Controller Alias Tag or as a Program Alias Tag?

I only scope tags to controller if they are needed by multiple programs or if IO or if a tag that requires controller scoping, such as a message tag. Otherwise I scope tags as program.
 
NetNathan said:
How do you decide what tags to configure as a Controller Alias Tag or as a Program Alias Tag?

Your question is specific to Alias Tags, but first I'll mention which Scope you should select for Tags in general...

You should create a Controller-Scoped Tag if it is used:

- In more than one Program within the Application
- As a Producer or Consumer
- In any of the seven AXIS data types
- In a Message

You should create a Program-Scoped Tag if it is used:

- In only one Program within the entire Application that will use the Tag

Now back to your question...

NetNathan said:
How do you decide what tags to configure as a Controller Alias Tag or as a Program Alias Tag?

Why use a Controller Alias Tag?

A Controller-Scoped Alias Tag can only be created as an Alias to a Controller-Scoped Base Tag. So the decision to create Controller-Scoped Alias Tags would have to be for reasons similar to those I have already outlined; that you want to, or have to use more descriptive and meaningful tag names than the raw Base tag names, such a "Local:1:I.Data.0", allowing you to "Alias" out all the I/O raw tag names that you don't want to use, or see in your Program(s), or in external Applications, such as HMI, or other Logix Controllers, which may be consuming the tag data. This is more of an aesthetic reason than anything else, but it does make sense to create a more easily understood tag naming convention.

Doing the above also creates a form of I/O Mapping of the raw I/O tag names, at the Controller Scope, which is another good practice to get into. If you use the Controller-Scoped Alias Tag of an I/O point, everywhere in your Program(s), and that I/O point fails, then you can simply redefine the Controller-Scoped Alias Tag to a spare Controller-Scoped Base Tag I/O point, which is just one edit, rather than having to edit the many possible entries, if you had just used the raw Controller-Scoped Base Tag.

Why use Program-Scoped Alias Tags?

You can create Program-Scoped Alias Tags to reference Controller-Scoped Base Tags, or Alias Tags (Double Aliasing). The Double Aliasing method, as mentioned already, allows you to follow a strict naming convention, where the I/O tag names and the Program tag names must use pre-defined tag names.

You can create Program-Scoped Base Tags to temporarily represent all your Controller-Scoped Base I/O Tags. This is for development work where you do not yet have the Controller I/O modules. You can then program all your logic, using the Program-Scoped Base Tags, in advance of having actual I/O modules and their addresses. You can even test your logic, and then when you have the actual I/O added, you can convert the Program-Scoped Base Tags to Program-Scoped Alias Tags referencing the actual Controller-Scoped I/O Base Tags.

You can create Program-Scoped Alias Tags to reference Program-Scoped Base Tags of an Add-On-Defined Data Type.

Example: An Add On Instruction (AOI), called "AOI_01_PPM_Count" was created to count Products Per Minute (PPM) on a system. This AOI contained several tags including BOOL, DINT, TIMER and UDT Data Types.

A Program-Scoped Base Tag was created as a generic tag holder for the AOI, called "AOI_01_PPM_Count_Holder". This tag was assigned the Add-On-Defined Data Type of "AOI_01_PPM_Count".

Within the same Program, a number of areas of logic were required to use the Base Tag "AOI_01_PPM_Count_Holder". To simplify the tag name for use in the logic, a Program-Scoped Alias Tag was created to reference the generic tag holder "AOI_01_PPM_Count_Holder".

Program-Scoped Alias Tag: "System_PPM"
Program-Scoped Base Tag: "AOI_01_PPM_Count_Holder"
Data Type: Add-On-Defined "AOI_01_PPM_Count"

When executing the scan, the Base Tag "AOI_01_PPM_Count_Holder" references the Add On Instruction (AOI). The Alias Tag is updated as the Base Tag is updated.

A Program-Scoped Alias Tag can be created to reference a piece of data within an array, such as the Preset (.PRE) of a TIMER. You can call your Alias Tag "Timer_01_PRE" and reference it to the Base Tag "TIMER_01.PRE". This way you can break out parts of a usually fixed array into individual tags.

Regards,
George
 
Reading A-B documentation I see conflicting info on the use of multiple aliases to same tag and nested aliases (alias to an alias).

Integrated Architecture:Foundations of Modular Programming (Publication Number IA-RM001C-EN-P) in section A4.2 Double Aliasing, declares this as good practice.

Logix5000 Controller Design Considerations in Chapter 3 says when assigning aliases, avoid:
• Nesting aliases.
• Using multiple aliases to the same tag.
On upload, the software decompiles the program and uses the physical memory addresses to determine which tags are
referenced in the code. All references to a base tag reverts to an alias if one exists. If multiple aliases point to the same
tag, RSLogix 5000 software uses the first alias tag (alphabetically) that it finds.

I created a project with both multiple and nested aliases, and then uploaded to an empty project. All aliases and values appeared correct.

Any advise on this?

Thanks,
David

In addition you may want to have a look at AB TechNote KB 30040
 

Similar Topics

Good day everyone, I am new to Allen Bradley PLC coding, and have been trying to figure out how to add a second backplane to a ControlLogix...
Replies
2
Views
5,035
Does anyone have any good ideas on how to better manage multiple users online editing the same program at once, specifically concerning...
Replies
7
Views
10,189
Can I use multiple OTE instrutions for the same tag at various different routines inside the program? I know that doing this would cause issues in...
Replies
8
Views
7,597
Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
111
Back
Top Bottom