![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Nov 2013
Location: Home
Posts: 3
|
RSLogix 5000 Multiple Aliases to Same Tag
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 |
![]() |
![]() |
#2 |
Lifetime Supporting Member + Moderator
|
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.
__________________
___________________________ ![]() abtrain@tiscali.co.uk www.abtrain.co.uk tel: 07506 73 9999 Everything works with smoke. Let it out, and it stops working. Nil Carborundem Illegitimi |
![]() |
![]() |
#3 | |
Lifetime Supporting Member
|
Multiple & Double Aliasing...
Quote:
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
__________________
"A little nonsense now and then is relished by the wisest men". Last edited by Geospark; May 26th, 2014 at 02:26 PM. |
|
![]() |
![]() |
#4 |
Member
![]() ![]() Join Date: Nov 2006
Location: Brisbane
Posts: 685
|
+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 |
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Nov 2013
Location: Home
Posts: 3
|
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 |
![]() |
![]() |
#6 | |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2011
Location: Corona, CA
Posts: 1,819
|
Quote:
__________________
****Control Freak**** Net is where I be and Nathan is me. |
|
![]() |
![]() |
#7 | |
Lifetime Supporting Member
|
Quote:
Never had any problems doing this.
__________________
True craftsmanship is only one more power tool away. That's the beauty of processors, they don't have emotions they just run code - The PLC Kid. |
|
![]() |
![]() |
#8 |
Lifetime Supporting Member
|
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.
__________________
True craftsmanship is only one more power tool away. That's the beauty of processors, they don't have emotions they just run code - The PLC Kid. |
![]() |
![]() |
#9 | ||
Lifetime Supporting Member
|
Quote:
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... Quote:
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
__________________
"A little nonsense now and then is relished by the wisest men". |
||
![]() |
![]() |
#10 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2011
Location: Corona, CA
Posts: 1,819
|
Very helpful....thanks GEOSPARK and TConnolly
__________________
****Control Freak**** Net is where I be and Nathan is me. |
![]() |
![]() |
#11 | |
Member
|
Quote:
__________________
------------------------ Yes, training is expensive - but ignorance is where the REAL money is .Ron Beaufort Some jobs start out best with a Sawzall and a Dumpster on casters. OkiePC |
|
![]() |
![]() |
Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PID Control Action Mode in RSLOGIX 5000 | plcnovel | LIVE PLC Questions And Answers | 16 | November 6th, 2020 01:22 AM |
RSLOGIX 5000 Error Message | introl | LIVE PLC Questions And Answers | 5 | March 15th, 2015 09:39 AM |
How To Write the path of tag in RSLogix 5000 | b_e33 | LIVE PLC Questions And Answers | 8 | July 30th, 2013 02:36 AM |
RSLogix 5000 Tag access | wfortuny | LIVE PLC Questions And Answers | 5 | November 22nd, 2011 06:27 PM |
Parsing out a tag name in RSLogix 5000 | blueagate | LIVE PLC Questions And Answers | 6 | March 26th, 2011 12:04 PM |