# Impact of UDT usage on performance

**URL:** <https://forum.inductiveautomation.com/t/impact-of-udt-usage-on-performance/65987>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 2, 2022, 10:48am UTC](https://forum.inductiveautomation.com/t/impact-of-udt-usage-on-performance/65987 "2022-11-02T10:48:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Avet](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Frederic\_Avet](https://forum.inductiveautomation.com/u/Frederic_Avet)\
**Post date:** [November 2, 2022, 10:48am UTC](https://forum.inductiveautomation.com/t/impact-of-udt-usage-on-performance/65987/1 "2022-11-02T10:48:08Z")

</div>

Hello,

I'm looking to utilize UDT's for implementing alot of Valves, Motors, Analog sensors,....

Lets say we have a UDT of the following structure:  
Motor Struct

- Cmd Struct
  - Fwd Bool
  - Rev Bool

- Status Struct
  - Standstill Bool
  - Forward Bool
  - Backward Bool

The way I look at it currently with some research on the forums and the web you have the following options:  
You make an udt with the full UDT subscribed and save this in a Meta data Tag named Source and some parameters with the OPC Path looking like this:

- nsu=[http://www.siemens.com/simatic-s7-opcua;s=](http://www.siemens.com/simatic-s7-opcua;s=)"{DB Name}"."{InstanceName}"

Then you make the struct of the UDT like you have in the PLC and get each value from the JSON in derived tags with

- Source Tag Path: [.]../../Meta/Source
- Read Expression: JsonGet({Source},"Cmd.Manual."+{TagName})
- JsonSet({Source},"Cmd.Manual."+{TagName},{Value})

The other possibility is just making the structure and adding the OPC path to each component.  
This makes a subscription per member of the UDT -\> Not optimal for big UDT's?

I'm currently testing the first option but I can't seem to be able to get the tags out of the Leased state when there are no views or clients open.

So my questions are these:

- Is it possible the setup with JSON read and write interferes with the Leased setting of Tag Group?
- What would the most optimal way be to config the UDT's with JSON or OPC UA directly for each member of UDT?
- When making template views in perspective i'm currently using path binding as it seems more optimized for big amounts of templates in a view, is this correct?
- Do you need to watch out for limits with the Tagproviders and Tag groups? Should you make a new one per x Tags?

---

<div class="post-metadata">

**Author:** ![Frederic\_Avet](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Frederic\_Avet](https://forum.inductiveautomation.com/u/Frederic_Avet)\
**Post date:** [November 8, 2022, 8:22am UTC](https://forum.inductiveautomation.com/t/impact-of-udt-usage-on-performance/65987/2 "2022-11-08T08:22:00Z")

</div>

I have indeed found the answer that using derivative tags to read a document tag will make it impossible to use leased tag groups.  
Any other additions would be appreciated

---

<div class="post-metadata">

**Author:** ![m.pelagatti](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/m.pelagatti/32/68595_2.png) [@m.pelagatti](https://forum.inductiveautomation.com/u/m.pelagatti)\
**Post date:** [November 8, 2022, 9:16am UTC](https://forum.inductiveautomation.com/t/impact-of-udt-usage-on-performance/65987/3 "2022-11-08T09:16:13Z")

</div>

Hi,  
read this post

> [@Opc and Leased Tag Group](https://forum.inductiveautomation.com/t/opc-and-leased-tag-group/55655):
>
> Hi to everyone! I have a problem with Opc Ua and Leased Tag Group. Inside my project I have too many tags with OPC (about 2900 tags) and this cause the tag quality to be “Good\_Overload” when the system drop the scan frequency to ensure the readability of all the tags. I would like to know if there’s some way to decrease temporarily the scan frequency of the Opc Tags. I have tried to use the the leased tag group in order to slow the update of hidden tags, but it doesnt work: I see the tag updatin…

is not possible to use derivative tags to read a document and use leased tag group, because each derived tag request information to document tag , and is the same like it's showed in a page.

I'm in testing another tag group but driven, and request tag only with a bit (for me it's a cycle.started)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2f8e8e7e2fc36ede1012557eac9b5f3ba981f807.png)

i use this group in document tag and all tag connected to this cycle.  
When bit is on , refresh is 1500ms, when is off refresh 3000ms

Tell me if is useful for you.
