Mass Modification (Renaming) of Tags in Studio 5000

justin lutz

Member
Join Date
Aug 2008
Location
Columbus, Ohio
Posts
93
Hello,

I am working on a project where we are migrating from PLC-5 to ControlLogix. I have used Project Migrator in an attempt to expedite the migration. The first time I tried this utility, I did not select the option for converting symbols to alias tags. The tag descriptions came over no problem, but we are still left with a program full of "tags" that use RSLogix 5 memory registers. The second time I tried this, I did select the option for converting symbols to alias tags. The symbols from RSLogix 5 came in as the actual tag name, however the issue here is that since RSLogix 5 has a 20 character limit, many of the descriptions used were highly truncated.

In either of these two scenarios, I am looking for a way to perform a mass modification of the tag names in Studio 5000. I tried performing an export of the tags and logic to a CSV file and pasted my new tags in over the old tags. After importing the CSV back into Studio 5000, I quickly found that instead of overwriting the old tags with the new, it kept the old tags and added the new tags, essentially doubling my tag count. I have since tried countless scenarios of trying to achieve this mass modification, with no success. o_O

I have read on one of the threads here that it may be possible to export to an L5K file and then to perform find/replace on the tags in Notepad, but I am dealing with 3 PLCs with roughly 1,000 tags per PLC. Individual find/replace will not be efficient. Also, I did give this method a try and manually modified one tag in Notepad. When importing the modified L5K file, I received an error regarding a missing end delimiter on the row that I modified. I was careful to replace only the text I needed to and I compared the modified L5K file against a known working one and could not spot any difference. Based on this experience, I do not feel this will be a reliable method for achieving what I need, but perhaps I am missing something.

Has anyone else had success in doing this or is anyone aware of any other ways to accomplish what I am trying to do? I have searched the RA Knowledgebase and forums, but to no avail. I've burned a fair amount of time trying different things and could use a shove in the right direction (if there is one).


Thank you,

Justin
 
Justin
Hi, I seem to remember trying this one time. I used a CSV a lot a few years ago modifying a program, quite a large one. A suggestion would be to get the tags you want on your CSV, like you said, you pasted the ones you wanted over what you exported, and then import them into a new project. See if all is well, then delete the old tags in your current project and import the tags you want again and you won't have duplicates. I believe off line one can select multiple tags and delete them. Hope this helps.
 
Thanks, I appreciate your reply. I'm not sure I completely follow your suggestion, but I am definitely willing to give it a shot if I can better understand it.

A suggestion would be to get the tags you want on your CSV, like you said, you pasted the ones you wanted over what you exported, and then import them into a new project.

I'm not quite following how the new project comes into play here. Do you mind elaborating a bit?

See if all is well, then delete the old tags in your current project and import the tags you want again and you won't have duplicates.

I am not sure if this is exactly what you are suggesting, but one of the things I've tried is pasting the new tags into the CSV. In Studio, I now have double the tags. The ones I am trying to overwrite Alias the RSLogix memory registers. I have tried just deleting the old tags, but my new tags are still not associated with the memory registers throughout the logic.

So then I thought, what if I make all of my new tags Alias the RSLogix memory registers, too? To be clear, if my old tag was "BOY" and it aliased B3:0/0, and my new tag was "GIRL" and it also aliased B3:0/0, then in theory, once I deleted the old tag, "BOY", my new tag "GIRL" would automatically be associated with B3:0/0 and of the associated instances in the logic. Nice thought, but in practice, this just left me with an undefined old tag and the original B3:0/0 description being deleted. I really thought this might work, but it didn't, and I don't exactly understand why.
 
OK, so my thoughts were to open a new project. Like under "File" New --> project. Assign it the same type controller and name it a different name from your current project and then save it. Then open the controller tags and import all the tags you want that are on your CSV. They may have some red X's because there's no I/O, but at least you have them. If all looks good, like data types, descriptors, etc., then go back to your existing project and delete the tags you want to replace. And what I was taught was to clear the CSV then do an export from your "new" project to the CSV and import those into the existing project. This may eliminate the duplicates. Hope this is better. And that it works.
 
Thanks for the additional explanation! I'm tracking with you a little better.

If all looks good, like data types, descriptors, etc., then go back to your existing project and delete the tags you want to replace.

Does it matter if you delete them in Studio versus in the CSV? I assume you meant in Studio.

And what I was taught was to clear the CSV

What do you mean by this?
 
I would delete them in Studio and by clear I mean delete everything from the CSV before you export to it from your "new" project after you've seen that all is well with the tags. This way you are sure to only have what you want. Actually, referencing your statement, delete in both places: the existing project and the CSV.
 
I'll throw out a suggestion but it's a little extreme and requires VB scripting skills. I feel like there should be a simpler way to accomplish what you want but it's eluding me at the moment.

Create a csv file with your old and new tag names. Open up your Logix 5000 project, put the focus on Controller tags in the Edit mode. Then write a VB script, using the SendKeys method, to loop through your csv file and send the keystrokes to
1. Ctrl-G to bring up the GoTo diaglog box
2. the old tag
3. ESC key
4. F2 (to edit the tag name)
5. the new tag
6. ENTER key
 
I'll throw out a suggestion but it's a little extreme and requires VB scripting skills. I feel like there should be a simpler way to accomplish what you want but it's eluding me at the moment.

Create a csv file with your old and new tag names. Open up your Logix 5000 project, put the focus on Controller tags in the Edit mode. Then write a VB script, using the SendKeys method, to loop through your csv file and send the keystrokes to
1. Ctrl-G to bring up the GoTo diaglog box
2. the old tag
3. ESC key
4. F2 (to edit the tag name)
5. the new tag
6. ENTER key

I'm intrigued, but a little confused. I can see how the six steps replace the old tag name with the new tag name. But how do you get SendKeys running in Excel to send the keystrokes to RS-Logix/Studio 5000? Is there a way to create an Application object for RSL5K?
 
This may help: Open the tag browser, select the EDIT TAG tab. Highlight the tags that you want to change. For instance:

ConveyorStop
ConveyorFull
ConveyorEmpty
ConveyorRunning

Use CTRL-H to change the portion of the tags that you want to rename. For instance "Conveyor" to "PLCSnet". After executing you'll have changed the tag names to:

PLCSnetStop
PLCSnetFull
PLCSnetEmpty
PLCSnetRunning

I use this procedure all the time for replicating and renaming tags.
 
I'm intrigued, but a little confused. I can see how the six steps replace the old tag name with the new tag name. But how do you get SendKeys running in Excel to send the keystrokes to RS-Logix/Studio 5000? Is there a way to create an Application object for RSL5K?

There may be a way to do it within VBA in Excel, but I was thinking of a VB script to run in Windows outside of Excel.

https://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx
 
I'm doing the same, but micrologix to compact. I also don't alias as I think it looks messy in the end. My 'trick' is I make sure that all of the old register tags have descriptions which should get importing from the symbol. Then I use TinyTask and record myself doing it once (copy symbol name, paste into new tag, push enter, scroll down on the tag screen). Then it just let this run for however many of each type of variable.

Then I do the exact same thing, except with 'find and replace'. Record one time on tiny task of copying old variable name, copying new variable name, pushing replace all, scrolling down once on each tag list. You can run tiny task a couple times faster than humans can do it and you can drink coffee/browse reddit while it's running.

Not elegant but nicer than manually doing it.
 
Creating ALIAS from MicroLogix migration

Last week I came across this process and here's what I did.
1) Export from MicroLogix to get .ACD file and .CSV file
2) Open .ACD file in Studio 5000 then import .CSV file (see attached screenshot #1).
3) Export .CSV file from Studio 5000.
4) Refer to the other screenshots for replacing COMMENT with TAG or ALIAS
5) Typing your own tag names under NAME on same row with corresponding SPECIFIER (Note: SPECIFIER is "Base Tag" generated automatically from "Migration" process).
https://drive.google.com/file/d/1q3dxnwrDAOZofh_uRWhNhAl_SjfArGJa/view?usp=share_link
https://drive.google.com/file/d/1brtz35nFE6AfLQLuTRKfRaSvlJz30sJW/view?usp=share_link
https://drive.google.com/file/d/1zJsb-b9YSbQ82O5Y1PnXVf004fNBsajp/view?usp=share_link
 
Last edited:
I personally wouldn't use Excel. It is notorious for its side-effects when dealing with CSV files.

Much better is Visual Studio Code. And it's free.

That said, exporting to L5X (XML variant) is what I do all the time. Exports, edits in VSCode, and imports are fast and reliable.
 

Similar Topics

Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
143
How is it going y'all? So We have had a pesky problem with an EH 300 flow meter. We are using EIP to reset the totalizer, and for some reason the...
Replies
3
Views
774
I need modbus communication tool for Yokogawa Rotamass Flow meter? can any one help me.
Replies
1
Views
979
Is anyone here familiar with the S-Mass flow meters from FMC/Smither Meter? I am looking to interface with the "MicroPak" transmitter module...
Replies
2
Views
1,863
I have a project including S7-300 CPU 314 2PN/DP and this CPU will communicate with Promass 83DP. I tried to connect the flow meter through the...
Replies
4
Views
2,890
Back
Top Bottom