# Siemens S7-1500 OPC UA Struct with TON Member

**URL:** <https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247>\
**Category:** Ignition\
**Created:** [July 31, 2020, 7:03am UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247 "2020-07-31T07:03:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [July 31, 2020, 7:03am UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/1 "2020-07-31T07:03:18Z")

</div>

Hi

We use the built in OPC UA server of the Siemens S7-1500 and want to read entire structures into document tags.

It seems a TON member trips it up. I don’t know if this is a bug or just a limitation.

This is the DB, prior to the TON member:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/4/542c0b7322a3d6746df8203583906bc1fc98e37d.png)

It can read that just fine:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7f56aa2437bd48bb46540b02ad49c00f246bc63.png)

When the TON member is introduced, the read goes bad:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01b2911a7c05e9d1dfb5e9eaf9da58f0a3aed5f7.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e50fede6c9a58b080865538ad44f8d80e3f349c0.png)

I do find it strange the struct with the TON node is fine in the client diagnostics:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/398b9681f65edbc168cc08a98500109617ba9aa0.png)

Please let me know if I can provide any other info.

Regards,  
Deon

---

<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:** [July 31, 2020, 12:08pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/2 "2020-07-31T12:08:01Z")

</div>

Can you find the logger for DataTypeDictionaryReader, turn it to TRACE, and then edit/save the OPC UA connection? Once it has reconnected and resubscribed your tags send me the logs.

---

<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:** [July 31, 2020, 3:02pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/3 "2020-07-31T15:02:50Z")

</div>

What firmware version are you using? Can you try doing a full compile and download to the PLC?

The datatype dictionary returned simply doesn’t include a definition for whatever type MyStruct2 is for some reason.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [July 31, 2020, 5:19pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/4 "2020-07-31T17:19:33Z")

</div>

Firmware v2.8.1 (Project v16). I am planning to upgrade to 2.8.3 in the week.

I have uploaded more logs as requested to the same share.

The event at 19:14 local time (UTC+2) is with the TON\_TIME in MyStruct2, and it does not appear. The event at 19:15 is where I changed MemberTON to a Dint just to see, and then it did appear.

---

<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:** [July 31, 2020, 5:39pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/5 "2020-07-31T17:39:42Z")

</div>

Maybe the firmware update will help. It seems the struct definition doesn’t appear when you use the TON\_TIME datatype for a member.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [August 2, 2020, 4:24pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/6 "2020-08-02T16:24:34Z")

</div>

Upgraded the firmware to v2.8.3 with no change. Uploaded the logs anyway.

Event at 18:18 with TON Member where MyStruct2 does not appear. At 18.20, changed to Dint and it appeared.

Is this a Siemens server or Ignition client issue? If it is a Siemens issue, I can pass the info along to them if you can assist in articulating the problem statement. I have a 4 year ongoing conversation with Siemens about the OPC UA server’s shortcomings.

---

<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:** [August 2, 2020, 4:49pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/7 "2020-08-02T16:49:49Z")

</div>

This appears to be a Siemens issue. We’ll have to get them involved.

I have a contact at Siemens who works on the OPC UA server in the 1500… I’ll ask them if this sounds familiar.

---

<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:** [August 3, 2020, 11:01am UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/8 "2020-08-03T11:01:21Z")

</div>

You will not be able to access a whole structure that contains any of the TIMER SDTs like IEC\_TIMER, IEC\_LTIMER, TON\_TIME, or TON\_LTIME.

These types contain hidden members necessary to their function that are not accessible from OPC UA or to be touched by anything else in the system.

Including one of these in your UDT implicitly creates what they refer to informally as a “Swiss cheese structure”. The same effect can be seen by making any member of a structure not accessible from HMI / OPC UA. Once you do this the structure definition disappears and it is not accessible as a whole.

Their suggestions is to make your own timer UDT with the members you need and copy/update those members from the user program.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [August 3, 2020, 11:47am UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/9 "2020-08-03T11:47:08Z")

</div>

That is unfortunate, but is effectively what I’ve already done.

I would think that Siemens can present only the members that were marked as OPC UA accessible, instead of making the entire structure inaccessible.

---

<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:** [August 3, 2020, 11:54am UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/10 "2020-08-03T11:54:07Z")

</div>

I think they do, if you browse underneath that structure in the address space (OPC Browser in Ignition). You should be able to see the individual nodes of your structure and its member structures. You just can’t subscribe to the structure at the root level any more - you have to bring in the individual members. This is not recommended at any kind of scale because it’s far less efficient.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [August 3, 2020, 12:50pm UTC](https://forum.inductiveautomation.com/t/siemens-s7-1500-opc-ua-struct-with-ton-member/37247/11 "2020-08-03T12:50:32Z")

</div>

You can read them individually, as we’ve been doing, but with terrible performance and you hit the 10000 max easily.

I mean it would be better if you could read the whole structure, and the controller simply omits the inaccessible member when you read the whole structure.
