Creating Alias Tags

plcnovel

Member
Join Date
Feb 2006
Location
LHR
Posts
215
Hi All
Is there a way to create alias tags through a piece of logic instead of creating in Tag editor for Rslogix5000


Thanks in advance
 
I think I understand your question. In ladder, I type the tag name into the element. Then right click the text to get the menu. The top choice is 'New "TagName"'. From there you can define the tag properties.

Hope that helps.
 
I don't think that's what he means. That would still be creating the tag in the tageditor.

I think he want's to create the tag with ladder, like in an instruction or something.
 
Last edited:
That is creating the tag in ladder. The desired tagname is typed into the element on the rung. The right click menu brings up a new tag popup to define the tag properties. It's much easier for creating occasional tags.

I normaly use the tag editor to defign large groups of tags.
 
nettogrisen said:
I don't think that's what he means. That would still be creating the tag in the tageditor.

I think he want's to create the tag with ladder, like in an instruction or something.

Yes this is exactly what i am looking for. Can i create tags using instruction? or is there in Excel type program where i put my I/O points and somehow it creates tags for those I/O?

Regards
 
I am going to assume that you have many tags and do not wish to use the RS Logix 5000 tool to do tag alias. If this is the case then try using the L5K export / import feature which is a text file. Start out by adding 2-3 alias tags in RS Logix. Export to L5K. See where and how the alias tags are set up in the export file. Use excel and/or cut/paste to populate the L5K file. Then import the L5K file.

It works for program tags and logic so I would presume it works for alias tags.

Best of Luck
 
Sheldn said:
I am going to assume that you have many tags and do not wish to use the RS Logix 5000 tool to do tag alias. If this is the case then try using the L5K export / import feature which is a text file. Start out by adding 2-3 alias tags in RS Logix. Export to L5K. See where and how the alias tags are set up in the export file. Use excel and/or cut/paste to populate the L5K file. Then import the L5K file.

It works for program tags and logic so I would presume it works for alias tags.

Best of Luck

Ok What i am trying to do is something like this, I have my UDTs defined in my generic program (DI, DO, AI, AO), what i want is to make a list of all the I/O points on Excel sheet and then somehow transfer the I/O information into PLC program in the following way:

For example, I have one discrete input called Level Low Low, once i import it into plc it should be converted into a Tag of data type DI (my discrete input UDT) with the tag name "Level Switch Low low". I hope it helps understanding what i am trying to accomplish?

Thanks
 
I do this with Excel all the time. About a year ago, I did a system with about 1500 IO - after inputting all of the IO stuff into my spreadsheet, it automatically generates tagnames, aliases, etc., for the IO tags, associated alarms, associated "was-bits", etc.

Just export your tag database to see the required format. Then when you have it all figured out, just write your formulas/macros to autogenerate, then save your new csv file and reimport.
 
OZEE said:
I do this with Excel all the time. About a year ago, I did a system with about 1500 IO - after inputting all of the IO stuff into my spreadsheet, it automatically generates tagnames, aliases, etc., for the IO tags, associated alarms, associated "was-bits", etc.

Just export your tag database to see the required format. Then when you have it all figured out, just write your formulas/macros to autogenerate, then save your new csv file and reimport.

Do u have any working example where i can get myself started. I am not that good in Excel/VBA programming
 
OZEE said:
I do this with Excel all the time. About a year ago, I did a system with about 1500 IO - after inputting all of the IO stuff into my spreadsheet, it automatically generates tagnames, aliases, etc., for the IO tags, associated alarms, associated "was-bits", etc.

Just export your tag database to see the required format. Then when you have it all figured out, just write your formulas/macros to autogenerate, then save your new csv file and reimport.

Great advice!
 
OZEE has given a good basic approach.

I think you are a bit confused about a couple things.
Alias tags do not have datatypes, they inherit the data type of whatever they are aliasing.
You can not alias real I/O to udt members.

My suggestion is that you create a few examples of the kind of tags you want by hand and then export the database to a csv file and examine the results. I think it will all become much clearer for you. Make sure you include some examples of tags and aliases so you can see how they are differrent in the csv file. Use "Tools" -> "Export" to make the csv file (not save as L5K).
 
It's really quite easy. The first part is to export, like mellis said. Then examine the difference.

Don't worry about building all of your tags, etc., with VBA -- I did it purely with functions. Learn to use the string functions (especially the & operator!) then just let 'er rip.

I also use that same spreadsheet to generate alot of my code templates. You know how all of your alarm templates look the same (XIC output XIO input BST TON alarmtimer NXB XIC alarmtimer.DN OTE alarmbit BND) -- it becomes real easy to build those templates in excel, too, then literally copy/paste 'em into your ladder. If you do it intentionally out of a complete spreadsheet, you put everything in up front, then all of the information is quickly available within a single spreadsheet to do this quickly and easily.

The hardest part is enterring in all of your tag definitions into excel, but I find it to be way faster to enter stuff into excel (especially when there are duplicate types of things - e.g., motor 1, motor 2, motor 3, ...) than to use Logix5k's tag editor. After all of the tags are enterred into excel, you can literally move 1000s of tags into logix5k in a matter of seconds!

FWIW, my spreadsheet includes the hardware address, tag definition, alias definition, alarm tags, alarm-tag aliases, alarm timers & aliases. Everything related to an individual item has the same tag "prefix", then I just append to it the specific tag function. E.g. everything related to Motor 1 will have an M1 prefix, then the tags become M1_AuxInput, M1_Output, M1_Alarm, M1_AlmTmr, etc. And I like to alias those to arrays called Alarm, AlmTmr, Output, Input, etc. so I can move lots and lots of information into WonderWare or RSView all in one fell swoop. It takes a little more memory, but I haven't come even close to the amount of memory that's available to me on a CLX processor.
 
OZEE said:
It's really quite easy. The first part is to export, like mellis said. Then examine the difference.

Don't worry about building all of your tags, etc., with VBA -- I did it purely with functions. Learn to use the string functions (especially the & operator!) then just let 'er rip.

I also use that same spreadsheet to generate alot of my code templates. You know how all of your alarm templates look the same (XIC output XIO input BST TON alarmtimer NXB XIC alarmtimer.DN OTE alarmbit BND) -- it becomes real easy to build those templates in excel, too, then literally copy/paste 'em into your ladder. If you do it intentionally out of a complete spreadsheet, you put everything in up front, then all of the information is quickly available within a single spreadsheet to do this quickly and easily.

The hardest part is enterring in all of your tag definitions into excel, but I find it to be way faster to enter stuff into excel (especially when there are duplicate types of things - e.g., motor 1, motor 2, motor 3, ...) than to use Logix5k's tag editor. After all of the tags are enterred into excel, you can literally move 1000s of tags into logix5k in a matter of seconds!

FWIW, my spreadsheet includes the hardware address, tag definition, alias definition, alarm tags, alarm-tag aliases, alarm timers & aliases. Everything related to an individual item has the same tag "prefix", then I just append to it the specific tag function. E.g. everything related to Motor 1 will have an M1 prefix, then the tags become M1_AuxInput, M1_Output, M1_Alarm, M1_AlmTmr, etc. And I like to alias those to arrays called Alarm, AlmTmr, Output, Input, etc. so I can move lots and lots of information into WonderWare or RSView all in one fell swoop. It takes a little more memory, but I haven't come even close to the amount of memory that's available to me on a CLX processor.

Thanks OZEE for your nice explanation. I understand all this. But like i said in my previous email, i am not that good at programming VBA. I can write down I/O description in excel spreadsheet but then how can i convert this description into tag and and then select the datatype, requires extensive programming in VBA, which i am no that great. So if you can just give me a starting example like how can i take one description , for example, water level High and convert it into a tag called "Water_Level_H" of Datatype "DI". and then import it into the rslogix5k. Thanks in advance
 
From a spreadsheet for a CLX project I did:

Code:
="ALIAS,,"&A11&","&V11&",,"&G11

This is NOT VBA!!! This is purely excel functions (and truth be known, this isn't even in excel. I'm using OpenOffice Calc for my spreadsheet. But this exact spreadsheet was developed in Excel.) Period. This code lives in the cell itself (in this example of my spreadsheet, cell Y11), not back behind the spreadsheet in the VBA macro stuff (I don't do VBA either...)

In this example:
You have to have all of those commas in those exact places. A csv is "flat spreadsheet", with the columns separated by commas. The end result for this to work requires that the various fields of the import-file be exactly how RSL5K expects it. If you have too many or too few commas (read this to mean: if you have the right info in the wrong fields!), the import will fail.

Cell A11 contains the base tagname (the name of the device). In this case it's "M7102_AUX" This tagname is elsewhere defined to point to Local:3:I.DATA.3. (This is the aux contact on motor starter for motor M7102)

Cell V11 contains the tag description (In this case "M7102 Leg Aux Contact"

Cell G11 contains "Local:3:I.DATA.3", the hardware IO address for that point.

Obviously (?) there are lots and lots of other cells in this spreadsheet (I didn't randomly pick columns A, G, and V.)

The result of that function (again NOT VBA!) is the following:

Code:
ALIAS,,M7102_AUX,M7102 Leg Aux Contact ,,Local:3:I.DATA.3

When you export your database like you've been instructed several times already (you have already done that, haven't you??), you will notice that there is some header information in the resulting csv file. THAT HEADER INFORMATION MUST REMAIN AS-IS! DO NOT CHANGE IT.

You can delete all of the lines below the header info (all of your previously defined tags) and past this line in below the header info, then import it back into RSL5k. Then your newly defined alias will appear.

Since I enter all of my tag info into a spreadsheet, I generate all of this info for every single tag in my whole project. When everything is entered properly, I will have all of my aliases created automatically. Then I can remake my csv file with the new information -- which literally takes only seconds! -- and import thousands of tag and alias definitions in very short time.

Does this help????

If not, try it and let us know what problems you have...
 
Last edited:

Similar Topics

Hello I was needing to create an alias tag (DINT) in the Controller tags folder for some I|O tags that’s located in the Program tags folder. The...
Replies
2
Views
1,466
The idea here is to provide for a brief rapid influx of message codes while preventing sequentially repeating the same message. i.e. if two...
Replies
23
Views
675
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
73
Hi everyone, I'm a last year student at the university in Ghent, and for my thesis i need to write a TwinCAT program that writes data to a .daq...
Replies
0
Views
140
When I go to create a new module in Studio 5000 I can't enter any information for the IP Address or change any other fields. Is there any fix to...
Replies
1
Views
253
Back
Top Bottom