Finer control over UDT instantance creation

It would be helpful to specify the number of child UDTs in a parent UDT.

Example: I have 20 widget lines. Each line has a variable number of stations. Each station has 5 robots. Each robot has 50 tags of interest (identical structure).

  • Lines 1 through 19 each have 5 stations, each station having 5 robots
  • Line 20 has 20 stations, each station having 5 robots.

So I create a “Line” UDT, a “Station” UDT and a “Robot” UDT.

  • Robot UDT is comprised of 50 OPC tags
  • Station UDT is comprised of 5 Robot instances
  • Line UDT is comprised of 20 station instances

The problem is that in creating my Line instances, the Lines 1 - 19 now have en extra 15 stations that are not used. Thus 15 stations * 5 robots * 50 tags = 3,750 extra tags.

What is desirable is being able to specify, for each Line, the qty of Stations. PLCs let us do this easily.

Maybe this breaks some fundamental OO programming principle, but it would be helpful to have.

In my current project I have ~30,000 extra tags being created because of this issue. Yes I can manually go through and disable unneeded tags [size=85](note that a bug currently prevents child UDTs being disabled when the parent is disabled, thus I’d have to drill down to individual tag to accomplish this)[/size]. But even so, these tags still exist, and whenever I make any change to the UDT, ALL instances have to get updated which can bog down the server. This issue is currently plaguing my system now.

You don’t have to UDT everything, although I realize that’s all your guys’ tendency coming from the PLC world…

Just use folders for your lines.

Just realized this is in the feature request forum :laughing:

Didn’t mean to dismiss your idea, consider it feature requested :thumb_right:

I tried another approach, which is to define a folder in my main UDT. Then when I create that instance, I manually add the variable number of child UDTs I need to that folder. However this doesn’t work either, as the the manually added UDT doesn’t inherit the parameter from its parent.

I’m not sure this is what you meant however. I will keep trying other methods to see if i can get it working properly. Maybe you can elaborate on your idea. It shouldn’t be a feature request if there’s an existing way to implement it easily.