Allen Bradley Poll: AOI vs UDTs

tarrant79

Member
Join Date
Jun 2020
Location
washington
Posts
23
Hi,
Im kinda new to Designer/Rslogix 5000 programming. Im using a L82E processor, anyways I was curious what the seasoned vets think about AOIs vs UDTs? I am great with a giant ladder logic of BOOLs, Reals, INTs/DINTs, and functions....But Im struggling with putting together nested AOI/UDTs (Say AnalogIn UDT, nested in a VFD module, nested in a PUMP module).


Given current tech and RS Designer 5000, what would you say is the easiest way of Object Oriented PLC programming today and why??


AOI vote vs UDT vote...Or even other if Im not thinking of it?
Thanks!
 
Ohhhh god no, I see that now... The question then is AOIs or something else? I see the big disadvantage of AOIs is No Online editing. But if their the best option to use I will go that direction.
 
Engineering tools aren’t subject to polls, votes, or other popularity contests.

Learn the tools you have available. Test them to their limits. Learn their trade-offs.

The best tool for the job often depends on its direct application. Other times an overlapping dependency of another part of the application informs your design decision. Sometimes it’s the terrain: Do you have enough memory? Is data atomicity critical? And so on.

What happens if the terrain doesn’t match your map?

Please clarify your question.

If you are nesting a UDT within an AOI (local tag) and wish to have programmatic access to them you can do so by setting up AOI input or output parameters with the atomic types that make up the UDT. You can also configure these parameters to be directly aliased to the UDT members. If by ‘external’ you mean an outside process, or HMI, is accessing the tags, external access can be configured down to each parameter or local tag.

Learn your tools. Never defer to as fickle a process as a poll.
 
Last edited:
They are both great.

UDTs make your code much easier to read. In the old days we would create a tag "motor" and then assign functions to each bit. And the tag could only reference boolean values
motor.1 = start
motor.2 = running
motor.3 = overload and so.

With UDTs you can give each bit a distinct name and you don't have to remember which bit number it is.
Motor.Running
Motor.Start
Motor.Overload
You can also combine all types of data types. This means you speed, pressure or whatever is in the same structure as your booleans.

You can also take individual UDTs and nest them. I would encourage you to use them. Try to find some examples to examine.

ONE CAVEAT - Be patient. You will find yourself modifying your first UDT several times as you think of things to add. But once you have one fully developed it will save you time.
 
In another couple years when you are really ready to go down the UDT rabbit hole, look into bit overlays. They aren't a good plan in all situations but they can be very helpful when referencing a bit-packed 16-bit integer is a structure.

Keith
 
Contrary to what everyone is saying here, I actually do think there is value in your question.

AOI vs UDT != Hammers vs Screwdrivers... Give me a moment.

It's actually the difference between a class and a structure. AOI objects also hold data values, but they also come with additional functions that users can define.
Practically in Rockwell Software, It's usually not a tradeoff as items are not though about as black boxes, so they are usually looked at in different lights.
AOI vs UDT is a valid question. AOI if you want to get a flavor of OOP, UDT if all you are looking for is bulk tag creation which resembles a real life object.
 
I know its ignorant, BUT....

I know it's a dumb question, but I was just getting befuddled, because I have to deconstruct 2 different programs: 1)1 uses no AOI, just UDTs with custom routines for every action. 2)other user lots of AOIs with nesting UDT.

The whole nesting is just throwing off my mindset, I'm used to digesting ladder style wire/ control diagrams. So the data types & logic are all plain and apparent. BUT I know without moduralizing stuff, u have to rewrite all the tags for each new routine, not getting the benefit of an AOIs reproducibility.

So I'm probably going to need a lot of practice until it because more 2nd nature....
 
This may seem pedantic but you aren't "nesting" a UDT in an AOI any more than you would be "nesting" an integer or "nesting" a float. A UDT is a piece of data, nothing more, nothing less. It happens to contain more than one piece of information in a defined format but it is still just a piece of data . Think of it as such.

The reason I say this is it seems to me you are attributing qualities to a UDT that a UDT does not possess. A UDT, like an array, has some specific qualities that are required in any tag-based plc. But in the end it is just data. You can very easily implement an AOI without the need for a UDT.

Keith
 
Contrary to what everyone is saying here, I actually do think there is value in your question.

AOI vs UDT != Hammers vs Screwdrivers... Give me a moment.

It's actually the difference between a class and a structure. AOI objects also hold data values, but they also come with additional functions that users can define.
Practically in Rockwell Software, It's usually not a tradeoff as items are not though about as black boxes, so they are usually looked at in different lights.
AOI vs UDT is a valid question. AOI if you want to get a flavor of OOP, UDT if all you are looking for is bulk tag creation which resembles a real life object.
He wasn't asking about pros and cons he was asking about which was preferred or which is better.

Just like a Hammer and a screw driver they both have their own uses. Asking about which one is better makes no sense. As it depends on the situation.

In High Level languages such as C# or C++ or Python. You may have Classes that only contain data. in the C# world these are refereed to as Data Transfer Objects/Classes. Then you also have classes that perform actions and hold data (this is a Traditional Object). Neither is universally better, they have different purposes. UDTs and AOI are the same way.

I for example use AOI and then I use UDTs to make messages that send data between different AOIs.


Or I might make a UDT that represents a Recipe Step, and then I have another UDT that represents the Recipe. I would then have some tags and such in the Recipe UDT but also have an array of the Recipe Steps UDTs. in the PLC world it would make no sense to make these AOI instances. You could do it for example if you want the Recipe Step AOI to validate the settings data but because they would have to be called some where you would make a mess.
 

Similar Topics

Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
4
Views
97
Dear community, I am trying to find a tool for Allen-Bradley PLCs similar to SiVArch for Siemens PLCs to automatically generate faceplates and...
Replies
0
Views
69
Hi everyone, new to forum. Since very long time i having issue with 1734-AENT module, after some period of time its keep stuck in error (simmilar...
Replies
8
Views
342
Hello, I am new here. I am trying to find good places to sell some surplus items that I have that isnt through ebay. Does anyone have any sources...
Replies
5
Views
345
Hi all, installed on chassis A17 an A/I from Allen-Bradley , problem is what ever I do , all channels are sticked on value 39.9 and cannot change...
Replies
1
Views
135
Back
Top Bottom