# Siemens, UDTs & OPC-UA

**URL:** <https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189>\
**Category:** Ignition\
**Tags:** perspective, siemens, ignition81, scripting\
**Created:** [April 1, 2024, 11:05pm UTC](https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189 "2024-04-01T23:05:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Holleger](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@Paul\_Holleger](https://forum.inductiveautomation.com/u/Paul_Holleger)\
**Post date:** [April 1, 2024, 11:05pm UTC](https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189/1 "2024-04-01T23:05:53Z")

</div>

Hi all,

I'm running up against a problem with trying to communicate tags over OPC-UA between an Ignition Gateway and 4 Siemens S7-1500 series PLCs. At a small number of tags, I seem to have no issue, but once I add about 10 UDT instances, I start getting tag quality problems, ranging from GoodOverload to BadTimeout, even on tags that were previously alright.

I've thrown just about everything I can think of at this. I've split tags within a single PLC into separate tag groups, hoping that might alleviate some traffic. I've maxed out all the OPC-UA settings on the Siemens side. I've been meticulous about assigning tags to tag groups, even going as far as to place everything in driven tag groups that I drive based on the currently active page.

I don't really know what else to try. Does anyone have any experience using Ignition with Siemens S7 PLCs, and how do you optimize OPC-UA communication with it?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 1, 2024, 11:12pm UTC](https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189/2 "2024-04-01T23:12:45Z")

</div>

Are you subscribing to every tag within each structure individually, or are you subscribing to the structure values as a whole (ends up being a Document in Ignition)?

> [@Paul\_Holleger](#):
>
> once I add about 10 UDT instances,

How big are these? You're not telling us much of anything without more detail about these UDTs.

---

<div class="post-metadata">

**Author:** ![Paul\_Holleger](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@Paul\_Holleger](https://forum.inductiveautomation.com/u/Paul_Holleger)\
**Post date:** [April 1, 2024, 11:29pm UTC](https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189/3 "2024-04-01T23:29:10Z")

</div>

> Are you subscribing to every tag within each structure individually, or are you subscribing to the structure values as a whole (ends up being a Document in Ignition)?

I've tried both ways. With the individual tags method, I can interact with and monitor them how I want, but I have these quality problems.

With Document tags, I seem to be able to poll them better (though not fully tested yet), but I can't seem to write to an element of that Document at all. I kept getting the error:

> Bad("Bad\_TypeMismatch: The value supplied for the attribute is not of the same type as the attribute's value.")

I tried multiple ways around this, to no avail. But all of those have involved the use of system.tag.writeBlocking(), which may not be the right way to go about doing this.

> How big are these? You're not telling us much of anything without more detail about these UDTs.

Forgive me for not providing much detail. I'm trying to juggle a lot right now, and after staring at this problem for a while, I'm no longer sure what information is relevant. Please ask me for clarification, and I'll provide what I can.

Here, the UDTs vary wildly from just a few bools and a string; to large, nested structures that can have several hundred tags inside. A mid-range UDT, which is what I had in mind, probably contains 100-150 base tags within it.

Here's an example of a mid-sized UDT that's currently working.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c6096cbc5021f7692944737e16dd7b688748bb1.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c4d5d3acf0b6900882352b9557c8238c8cf95dca.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 1, 2024, 11:35pm UTC](https://forum.inductiveautomation.com/t/siemens-udts-opc-ua/88189/4 "2024-04-01T23:35:13Z")

</div>

Well, the bottom line is that the Siemens server will perform drastically better if you read only the top level structures and use the derived tags with jsonGet/jsonSet strategy (described [here](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/2) and elsewhere) to read/write the tags. Unless the structures contain some kind of system type that results in a "swiss cheese" structure that can't be written to, writing should generally work.

The problem with this strategy is it's a real pain in the ass to set up and work with.

I've seen others do an end-run around the Monitored Item limitations in the Siemens server by just using dedicated Tag Groups set to OPC polled/read mode instead of subscribe mode.
