Bulk Edit Tags in AOI

benaiahhenry

Lifetime Supporting Member
Join Date
Sep 2011
Location
Corning, NY
Posts
265
Hey Everyone,

Does anyone know of a way to bulk edit tags in an AOI in Stuido5000?

I see a way to export the AOI tags to an excel file, but no way to import them.

Thanks!

-Benaiah
 
You can't modify AOIs online, are you trying to do that?

No, I'm just making AOI's offline and need to create several hundred sequentially numbered tags and it would be much easier to do in excel like I would do if they were normal controller tags rather than AOI tags.
 
I'm not following. An AOI automatically generates a corresponding UDT. So defining AOI tags aren't any different than defining a normal controller tag. If you create an AOI called "ValveAOI", it creates a "ValveAOI" udt.

When you create instances of the ValveAOI you need appropriate tags to match:

V100, DataType = 'ValveAOI"
V101, DataType = 'ValveAOI"


Tools --> Export --> Tags and Logic comments will create a .CSV file of everything. You can add your tags in this csv file (following the format) and import it via Tools --> Import --> Tags and Logic Comments

You don't have to import everything from the CSV file back in. You can delete everything in the CSV file and just add rows that correspond to the tag(s) you wish to create.

You'll have to give some more detail on where you're getting hung up.
 
No, I'm just making AOI's offline and need to create several hundred sequentially numbered tags and it would be much easier to do in excel like I would do if they were normal controller tags rather than AOI tags.


Why not use an array tag ?


eg. MyData[0] to MyData[399]
 
I cannot believe you are creating "several hundred" Input or Output parameters for an AOI, nor can I imagine you want "several hundred internal Local Tags.....

Are you trying to create the AOI tags for several hundred "things" that you have written an AOI handler for ? Like several hundred valves, for instance....

If so, you can create an array of your AOI tags and use the elements of the array as your AOI tags.

Suppose you had 400 Valves you want to call an AOI for each valve....

Create just one array tag called "Valve", but make it an array of size 400 (you might like to make it 401, and not use element 0).

Then, for Valve_105, for example, the AOI tag would be Valve[105]

The picture might be hard to see, but if you need any further help, just ask.

EDIT : Where is the picture ??
 
Last edited:
No, I'm just making AOI's offline and need to create several hundred sequentially numbered tags and it would be much easier to do in excel like I would do if they were normal controller tags rather than AOI tags.

One process to consider is this:
1. Create two or three of the sequentially numbered tags in the AOI.
2. Export the AOI to the .L5X file.
3. Open the exported AOI in a text editor and find the few tags. Examine the syntax for those tag definitions in the version of logix you are using.
4. Create an Excel workbook to mimic the syntax. Depending on how elaborate you want to get, you can use the Excel text functions, or just put the various definition components in columns, leveraging the sequencing feature of Excel.
5. Save the Excel workbook as a .CSV (or .XML) file.
6. Open the .CSV in a text editor and use search-and-replace operations to clean-up the output (e.g., remove commas) such that is follows the logix tag definition syntax.
7. Cut-and-paste the correctly formatted text from the text editor file into the .L5X file in the appropriate location.
8. Import the modifed .L5X, and if notified of a formatting error figure out where it went wrong and try again. (I think logix indicates the line number of the first error it encounters).

Sounds like a lot of steps, but probably better then several hundred paste-and-fix within logix.
 
Sorry I wasn't able to get back on yesterday, I had several machines that had final testing going on and it was a crazy day ;)

So, just to clarify. I am writing an AOI that handles a recipe download from a plant MES system. These recipes can have several hundred parameters in them. The AOI does all the handshaking and validation with the IT system. In the end the AOI will have an output parameter for each element in the recipe, and those outputs will then get mapped to the tags in the main PLC code. Part of the problem is that this AOI is generic and will be used with a bunch of existing equipment on the line that all handle their recipes internally in different manners, so I can't just pass a recipe structure as an in/out into the AOI and do the copying inside.

So I really am creating an AOI that has several hundered output parameters.
 
One process to consider is this:
1. Create two or three of the sequentially numbered tags in the AOI.
2. Export the AOI to the .L5X file.
3. Open the exported AOI in a text editor and find the few tags. Examine the syntax for those tag definitions in the version of logix you are using.
4. Create an Excel workbook to mimic the syntax. Depending on how elaborate you want to get, you can use the Excel text functions, or just put the various definition components in columns, leveraging the sequencing feature of Excel.
5. Save the Excel workbook as a .CSV (or .XML) file.
6. Open the .CSV in a text editor and use search-and-replace operations to clean-up the output (e.g., remove commas) such that is follows the logix tag definition syntax.
7. Cut-and-paste the correctly formatted text from the text editor file into the .L5X file in the appropriate location.
8. Import the modifed .L5X, and if notified of a formatting error figure out where it went wrong and try again. (I think logix indicates the line number of the first error it encounters).

Sounds like a lot of steps, but probably better then several hundred paste-and-fix within logix.

Thanks Mispeld! I had looked at doing it this way, the complicated part is that the .L5X file is a XML file and the part that defines the tag is more complicated than I'd like.

The definition for a output parameter looks like this:
Code:
<Parameter Name="DINT_03" TagType="Base" DataType="DINT" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>

But I'll probably play around with building something to make that in excel anyway ;)

It would be really nice if they let you import the tags into the AOI as well as export them.

-Benaiah
 
Why not use an array tag ?


eg. MyData[0] to MyData[399]

I thought about doing this as well, but that would mean that there was just a single output parameter on the AOI, and I would need each element to be a parameter.

If I used the array method then on the outside of the AOI I would have to have 250 move instructions to map that data to where I want it, but I want to be able to do those moves inside the AOI and just specify the tags as parameters.

-Benaiah
 
I thought about doing this as well, but that would mean that there was just a single output parameter on the AOI, and I would need each element to be a parameter.

If I used the array method then on the outside of the AOI I would have to have 250 move instructions to map that data to where I want it, but I want to be able to do those moves inside the AOI and just specify the tags as parameters.

-Benaiah


Make the destination tags aliases into the array, that way you won't have to do 250+ moves....
 
Just saying, using a serious programming editor, rather than Excel, can make this much much simpler.


I use UltraEdit/UltraEdit Studio for all of my text, xml, csv and other files.
 
So I really am creating an AOI that has several hundered output parameters.


If you really want to go down this route (and I suspect there must be a better way to handle your recipe data), then you can export the whole of the tag database to a CSV file that opens in Excel. If you had already created a couple of your AOI parameter tags, you can easily find them in excel, and copy them down as far as you want to go. Re-Import and the job is done.
 
If you really want to go down this route (and I suspect there must be a better way to handle your recipe data), then you can export the whole of the tag database to a CSV file that opens in Excel. If you had already created a couple of your AOI parameter tags, you can easily find them in excel, and copy them down as far as you want to go. Re-Import and the job is done.

Thanks daba, that worked. I didn't realize that internal AOI tags were exposed like that when you exported the main tag database.

And I agree, if I were able to design this from scratch, and dictate how the all the other parts of the line were handling recipe data, there would be much better ways of doing this! Unfortunately, I don't have those options ;)

-Benaiah
 

Similar Topics

Hello everyone! I've got something I'm trying to figure out and I'm possibly overthinking it. I've got a 25,000 gallon bulk chemical tank with an...
Replies
12
Views
2,166
Looking for a sensor to sense the presence of fertilizers of varying dielectrics held in storage bins. Have tried capacitance sensors with limited...
Replies
15
Views
6,298
Anyone have any experience integrating these bulk weighers to another control system?? I have a Red Lion HMI and a Schneider M580 PLC, the IND...
Replies
6
Views
3,095
I am currently making large modifications to a plant SLC500 PLC with 48 IO cards, I however only have access to a SLC500 with zero cards to do my...
Replies
4
Views
3,650
Hello All: I am looking at a project that will require a pretty big gob of data to be stored on a CompactLogix Processor. What I will end up with...
Replies
7
Views
4,260
Back
Top Bottom