You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old May 25th, 2014, 07:25 PM   #1
davidc100
Member
United States

davidc100 is offline
 
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
  Reply With Quote
Old May 25th, 2014, 08:45 PM   #2
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 5,072
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.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
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



  Reply With Quote
Old May 26th, 2014, 02:19 PM   #3
Geospark
Lifetime Supporting Member
Ireland

Geospark is offline
 
Geospark's Avatar
 
Join Date: Feb 2012
Location: Kildare
Posts: 2,936
Multiple & Double Aliasing...

Quote:
Originally Posted by davidc100
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
__________________
"A little nonsense now and then is relished by the wisest men".

Last edited by Geospark; May 26th, 2014 at 02:26 PM.
  Reply With Quote
Old May 26th, 2014, 07:30 PM   #4
MichaelG
Member
Australia

MichaelG is offline
 
Join Date: Nov 2006
Location: Brisbane
Posts: 685
Quote:
Originally Posted by Geospark View Post
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
  Reply With Quote
Old May 26th, 2014, 09:06 PM   #5
davidc100
Member
United States

davidc100 is offline
 
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
  Reply With Quote
Old May 26th, 2014, 09:35 PM   #6
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
Join Date: Nov 2011
Location: Corona, CA
Posts: 1,819
Quote:
Originally Posted by MichaelG View Post
+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?
__________________
****Control Freak****
Net is where I be and Nathan is me.
  Reply With Quote
Old May 26th, 2014, 09:53 PM   #7
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 6,151
Quote:
Originally Posted by MichaelG View Post
+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.
__________________
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.
  Reply With Quote
Old May 26th, 2014, 09:55 PM   #8
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 6,151
Quote:
Originally Posted by NetNathan View Post
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.
__________________
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.
  Reply With Quote
Old May 27th, 2014, 01:53 PM   #9
Geospark
Lifetime Supporting Member
Ireland

Geospark is offline
 
Geospark's Avatar
 
Join Date: Feb 2012
Location: Kildare
Posts: 2,936
Quote:
Originally Posted by NetNathan
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...

Quote:
Originally Posted by NetNathan
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
__________________
"A little nonsense now and then is relished by the wisest men".
  Reply With Quote
Old May 27th, 2014, 03:04 PM   #10
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
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.
  Reply With Quote
Old May 27th, 2014, 09:04 PM   #11
The Plc Kid
Member
United States

The Plc Kid is offline
 
The Plc Kid's Avatar
 
Join Date: Feb 2009
Location: Macon, Georgia
Posts: 3,233
Quote:
Originally Posted by davidc100 View Post
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
__________________
------------------------

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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
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


All times are GMT -5. The time now is 04:35 AM.


.