UDTs and Modbus Tags

Quick question, is there a way to create a UDT based on Modbus Tags? I’m watching the help videos and it looks like the UDTs are somewhat dependent on either A) A PLC that uses human readable names (So I can have multiple motors in the same PLC using a standard naming convention) or B) Multiple PLCs that use the same addressing (So I could use multiple Modbus PLCs that have the same equipment across several sites).

But is there a way to create a UDT to look at multiple motors all in the same PLC that uses Modbus?

I imagine this would be possible. But it would be up to you to find the route that makes the most sense. For an example, maybe all of your motors occupy the same range of tags. For all intensive purposes lets say each motor uses Holding Registers within a specific range. Motor one uses Holding Registers from 40100 to 40199 and motor two uses 40200 to 40299. So now you can setup your UDT so that all of the OPC Item Paths have a parameter passed in for the changing register value of 1 or 2. So all of our item paths would look like

[{device name[]0.HRUS{motorNum}00
[{device name[]0.HRUS{motorNum}01
[{device name[]0.HRUS{motorNum}02
[{device name[]0.HRUS{motorNum}03

motorNum would be the single number you want to manipulate for the register range. This is a very basic example to just give you an idea. This may or may not work for you.