UDT leasing

Morning

We have a project with a landing page that has about 120 small templates, each mapped to a UDT. Each template is clickable and takes the user to another more detailed overview of that particular area with more templates, each of these are clickable and go to page size template, on the large template there is an edit button to access editable items such as severity of alarms, device names etc. All of this works but the landing page and local overview pages can be slow to load, each UDT has at least 30 tags, some 50 or more.

The templates on the landing page only require half a dozen tags to display, I was wondering if I can make a small UDT and reference this in a larger UDT, ( know I could use indirect bindings but I’d rather not) so that I only lease the tags required on the landing page.

I haven’t tried parent and child UDTs, If I reference only the child on a template, will it lease the parent? if not thats good so how would I pass the parameters of the Parent, scripting? somthing like:-

param1 = event.source.littleUDT
param2 = tagPath of BigUDT


system.nav.openWindow('Main Window (1)', {'LittleUDT' : param1, 'BigUDT' : parm2})

I’ll think about this over the weekend.

Any thoughts?

Evening

OK so

param1 = event.source.littleUDT
param2 = tagPath of BigUDT


system.nav.openWindow('Main Window (1)', {'LittleUDT' : param1, 'BigUDT' : parm2})

is not going to fly, param2 is not going to reslove in to a UDT, using system.tag.read is not going to help either.

For this sort of thing if you are using UDTs, then I’d create nested templates. That way you can pass in what information you want and use whatever granularity is required. You could also use Indirect Tag bindings that reference members of the UDTs so the whole UDT isn’t leased.

Robert

thanks for the info

Do you have an example of “nested templates” so I can understand the UDT structure?

Thanks

Yeah, you can add a new tag manually in the Data Type Editor and just choose a ‘Data Type Instance’ instead of New OPC, New Memory Tag, etc.
[attachment=0]Capture.PNG[/attachment]

Robert

well that’s simple,

just so I completely understand, using your example, if New Member/bit 0 was part of a template. would the whole Motor UDT be leased or just the New Member part or just the bit 0.

conversely if Motor UDT/Amps was part of a template but no reference to New Member , would New Member be leased,

Just trying to understand the dynamics.

If you are using a specific instance of the ‘N7 Bits/bit 0’ in your template, then only that would be leased. If you have a UDT property in your template that is an ‘N7 Bits’ type, then all of the members of the ‘N7 Bits’ will be subscribed.

If you have ‘Motor UDT/Amps’ in your template, then it will only subscribe to that one, but if you have a ‘Motor UDT’ type in your template, then all of the Motor UDT (including the N7 Bits instance) will be subscribed.

Robert

OK, I’ve had a play with this and I can do what I need to do, thanks for the help, I made a string on the larger template that produced the “larger” UDT address and then use indirect binding

Many thanks