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