Hierarchical vs Array Based Tag Structures

I've been considering data and program structuring a lot with regard to PLC's (primarily Rockwell, Studio 5000). The way I see it, there are a couple design patterns that are scalable and work well.

A hierarchical OOP sort of design where dependent objects are nested in one another.
A flat data oriented design / entity component system approach where objects of the same type are stored in arrays.

I have definitely run into issues with the latter (swappable components, objects that rely on each other, but are very distant in the system such as two grippers interacting in a two robot system), but it is useful for understanding a system. I've seen OOP style recommended as good ways to scale systems, but in my own experience, data oriented design tends to be able to scale much larger and faster without as much structural burden because you only have to scale udts with data types, instead of data types and structural complexity.

So I have my own thoughts about good ways to handle code within studio 5000, but I would really value opinions on what pros and cons might be on UDT arrays vs hierachical UDT structures in terms of usability, performance, etc within Ignition and what your experiences have been.

There are many discussions here on performance implications of different structures. Since it seems that should be addressed first.

Read the whole thing, and its links.

1 Like