Purpose of alias tags in RSlogix5000

grnick50

Lifetime Supporting Member
Join Date
Nov 2010
Location
Ptolemaida
Posts
332
Can someone please explain to me what is the purpose of alias in the RSlogix5000 tags? How is this feature used?

Regards
Nik
 
One way that they can be used is to map IO to working variables, while still maintaining the view of the original address. For example, I can alias a BOOL tag "EndOfStrokePX" to "InputCard:1:I.0". When I use the "EndOfStrokePX" tag in my program I can still see the original tag reference so that is easy to know exactly where it came from (what IO point). This is a feature that you don't get if you just use XIC and OTE to make the working variable the input.

Another thing that you can do is relatively easily remap IO variables in your program. For example, you have a product that sometimes changes where the IO points are actually wired (maybe they move to remote IO or your IO card density changes when converting from a DC to AC based system). By using aliased tags ("EndOfStrokePX") you can relatively quickly remap all of the IO in one place (the tag editor), instead of having to jump all over the place trying to get every single directly addressed tag.

One drawback of using aliases is that it is not easy to change what the alias is referencing. Using the above example, maybe we want to make "EndOfStrokePX" aliased to "InputCard:1:I.4". Your options are to go offline and re-download (not always an option), or to get creative.
 
To answer the OP's question, we need to take a step back to the "old days"...

Prior to Logix5000, Allen-Bradley PLCs that had been around for 30-40 years all used "data-tables" to store the data.

There were various tables, each holding data of a specific data type... e.g iNteger, Floating-Point, Timer, Counter, etc.

Each table had a number (you could create more tables of any type you needed), and you addressed them as (eg) T4, N7, C5, N100, etc. The elements of the tables were addressed by preceding with a colon, so to address the fourth timer of T20 data-table, the physical address would be T20:3 (addressing starts at zero). To address the sub-elements of the data element, for example the "done" dit of the timer above, you use the address T20:3.DN

In those "by-gone" days, undocumented code was a real PITA to read and understand, so programmers added documentation to the addresses in the form of SYMBOLS and Address/Instruction Comments. These appeared on the ladder display and listings, making the code infinitely more readable and understandable. However, this "documentation" was always held offline, in the project files. If you didn't have the offline project files, and had to "go online" for troubleshooting, you would not see any of this documentation....

By now you are asking how this relates to Logix5000 and alias tags...? Only because it is totally different is the answer...

In Logix5000 systems, gone are "data-tables" and in their place are data storage areas using proper databases. Each piece of data you create can have a name (called a tag) that can be up to 40 characters long, so you can give it a tag-name that describes its usage, such as "RejectPartsCount", or "MissingLabelError", etc. This is of great benefit, because the tag databases, and the names of the tags in them, are stored in the controller, so the names (tags) are immediately visible if you don't have the matching offline project file, you would then "upload and go online"... the tag names would be there.

The "fly in the ointment" however, is I/O data... This is embedded within predefined (module-defined) data structures that magically appear when you put I/O modules into the I/O configuration.

The I/O points are therefore at fixed tag "addresses", such as Local:5:I.Data.23, and if that was indeed keshiks "EndOfStrokePX" then it isn't obvious, and you would have to add documentation to tell everyone. So along comes Alias Tags which allow you to create a tag in the database that simply tells the controller where to address the actual data. It acts like a redirector only, and NEVER holds any data itself, even though RSLogix5000 software can lead the unwary into believing it holds data, because it simply shows the value held in the base tag.

I've intimated that alias tags are only usefull for I/O data, but they can also be useful for HMI or SCADA data that is often packed into arrays to improve network bandwidth. So instead of your code addressing (eg) HMI_AxisData[37], which means very little to very few people, you can create an alias tag (eg) Z_Axis_MaxTravel_SP as an alias to HMI_AxisData[37]

Get the idea Nik?
 
Another great use of alias tags is using them as program tags linked to controller tags. For example:

Controller Tag
Control_Tag UDT Array of 10

Control_Tag[1].RUN
Control_Tag[1].STOP
Control_Tag[1].HOLD
Control_Tag[2].RUN
Control_Tag[2].STOP
Control_Tag[2].HOLD

I have two programs that use the control tags, as typicality run/stop/hold type of commands are going to be the same across the board.

Both programs have an alias tag called: ControlTag
However, in program 1 ControlTag is aliased to Control_Tag[1]
program 2 ControlTag is aliased to Control_Tag[2].

As a result the program LOGIC is the same for each program. What happens if I need to make a change or improve the logic? Well you can simply copy your changes from program 1 to program 2 and the aliasing will take care of the details, no need for 'find and replace'. Now imagine you're onsite commissioning. And you have 50 programs, and find that you have to change all 50? Test everything on program 1, make sure it is tested and does what you want, have the jr. engineer copy & paste to the other programs. Makes things very easy.
 
One drawback of using aliases is that it is not easy to change what the alias is referencing. Using the above example, maybe we want to make "EndOfStrokePX" aliased to "InputCard:1:I.4". Your options are to go offline and re-download (not always an option), or to get creative.

Yeah, I think part of this is that if this tag is 'on-scan' from an HMI/SCADA system it prevents you from modifiying it. If it isn't 'on-scan' I typically just rename 'EndOfStrokePX' to 'EndOfStrokePX_A' (this doesn't work if it is 'on-scan'). Then create a new tag of 'EndOfStrokePX'. Delete the old one once all the references have been removed. A hassle yes, but not too complicated if you are in a pinch.
 
Alias Tags - Rename, Delete, Reassign...

keshik said:
...One drawback of using aliases is that it is not easy to change what the alias is referencing...

Paully's5.0 said:
Yeah, I think part of this is that if this tag is 'on-scan' from an HMI/SCADA system it prevents you from modifiying it. If it isn't 'on-scan' I typically just rename 'EndOfStrokePX' to 'EndOfStrokePX_A' (this doesn't work if it is 'on-scan'). Then create a new tag of 'EndOfStrokePX'. Delete the old one once all the references have been removed. A hassle yes, but not too complicated if you are in a pinch.

Not quite...

Note: keshik is referring specifically to not being able to "...change what the alias is referencing..." as opposed to renaming it or deleting it.

For an Alias Tag on scan, or referenced, you are prevented from modifying it as in renaming it or deleting it. The same can be said for most other Tags in a Logix controller.

However, an Alias Tag being on scan is not what prevents one from reassigning its Base Tag reference.

As we know, an Alias Tag is a reference, or pointer to an already defined Base Tag value and has no memory of its own. When a program is downloaded it is compiled into a controller as machine executable code and physical memory addresses. Its Alias Tags are resolved against their Base Tag references and stored in memory by name only, with a small amount of overhead. Once stored, the controller locks these Alias Tag references in.

Therefore, it is impossible to reassign Alias Tag references online. It does not matter whether the Alias Tag is on scan or not, you cannot change the reference online. An offline edit must be performed and re-downloaded to compile an edited Alias Tag reference into the controller's memory again.

If you want to rename or delete an Alias Tag, then yes, it must not be currently referenced. All references must be removed before you can do so.

If you are trying to reassign an Alias Tag reference to another Base Tag, while online, then deleting the original Alias Tag is the best way to do so. You can then simply create a new Alias Tag of the same name but with the new Base Tag reference. But as already mentioned, this is not always possible when the Alias Tag is on scan.

If you cannot take the Alias Tag off scan i.e. make it unreferenced, then the temporary, or permanent workaround is to create a new Alias Tag that references the new Base Tag and use that instead. The drawback here, for both methods, is that all instances of the old Alias Tag must be replaced with the new. This could be just one instance, or many.

If this temporary measure is used, and you must keep the old Alias Tag name, then at the earliest convenience, an edited program with the same Alias Tag name and new Base Tag reference, and instances reinstated, can be downloaded to the controller.

Modifying Tags that are on scan to HMI applications...

Any Logix controller Tags that are being referenced by RSLinx Classic, RSLinx Enterprise, or similar Servers, are considered to be on scan.

If you cannot modify a Tag because it is on scan to a PanelView terminal, for instance, then you can reboot the terminal to stop the Server. This will free up the Tag for deletion, etc.

Of the many Logix controller tag types, these are the types which may be modified, even when on scan...

Message
Digital Alarm
Analog Alarm
Motion Axis
Motion Group

Regards,
George
 
Last edited:
Packed arrays for HMI?

Aliases rock.

But if, as Daba said in his excellent description, the data is packed into arrays to send to the HMI, how is the data identified to the HMI builder? Is there any way the UDT packed array can transfer the aliasing or other description?
eg. Presumably the HMI builder receives only HMI_AxisData[37] so how do they identify that as Z_Axis_MaxTravel_SP?

I can see that the array element has a description field when the HMI picks up the tag database, but I cant see where to enter it. The UDT does not seem to offer descriptions of individual array elements and the description in the Controller Tag database is not appearing at the (PVP) HMI end. I wonder what I am missing. o_O
 
But if, as Daba said in his excellent description, the data is packed into arrays to send to the HMI, how is the data identified to the HMI builder? Is there any way the UDT packed array can transfer the aliasing or other description?
eg. Presumably the HMI builder receives only HMI_AxisData[37] so how do they identify that as Z_Axis_MaxTravel_SP?
Welcome to the forum! The answer may depend on the HMI in question. FT View has the ability to access the alias tag name, so this is not an issue.
 
Last edited:
thanks RonJohn
I am using a PVP and I can see the tag names in the Tag Browser but not the descriptions. My thought was to have a generic data type called HMI_etc with arrays of values and bits to pass to the HMI, and use the description to say what they are... that way when I decide to change a tag name in the PLC I dont have to go thru the FT and change all the tags to the new name. Just change the description in the tag database... Maybe there is an easier or better way, just my take on it. I have little experience with this stuff, but when i am fixing my PLC code I often find that the original tag name could be clearer or better and then when i change it the PVP tags are broken.
 
I probably should have started a new thread because this is not really about aliasing, more about the Tag Browser in FT view...
 

Similar Topics

Hello everyone, I'm relatively new to PLCs and currently engaged in an R&D project involving multiple sensors for measuring torque, RPM, and...
Replies
3
Views
155
We finally replaced our Cognex Checker with an IV-3 and I'm wondering if can replace the s/w in the monitor with anything else. I haven't been...
Replies
0
Views
96
Hello everyone. I am currently doing a project to teach about ethernet topologies such as ring or bus. For example. But instead of using an...
Replies
8
Views
4,332
Hello Friends, I want to learn Delta-v DCS, I'm looking for Delta-v DCS programming software (Demo or in VM Ware) Please. I'll be grateful...
Replies
1
Views
1,667
Hi Guys, I am aware that the S7-1200 series on their right side have an I/O expansion port. Like this...
Replies
4
Views
1,552
Back
Top Bottom