Correct way to approch Siemens UDT's and big data structures

Hi all,

I'm looking for a steer on what the best/ correct way to approach reading / writing big data structures on Siemens OPC UA servers (Apart from don't!). Quite often I have an issue that I can read, but cannot write due to getting errors.

As an example:
I have the following data in a PLC UDT:

If I create this as a document tag, and drag to a custom property, all is groovy. I can read it fine.
image

However if I try and change any of the values I get the following:
image

It doesnt seeem to matter what I try and change, its always this error.
Using the methods described in this forum post I can write the data structure, however @Kevin.Herron has kindly redirected me to this fresh new page :slight_smile:

So questions are:

  1. Is the way I'm reading the structure 'Correct'?

  2. Is there a better more efficient way of doing it?

  3. Why do I get the error above on a bidirectional write?

  4. Whats the best solution to work around it?

Thanks all!
Alex

Hmm, I have no idea if this "drag to a custom property" thing is supposed to work. I honestly don't know what that does on the backend and what happens when you modify that property.

The traditional setup for structures from OPC UA servers is to create a set of matching derived tags that use jsonGet/jsonSet expressions for each of the members, and then write to the derived tags, which in turn write to the document tag for the base structure.

Ah, so basically I'm cheating the system! :smiling_face:

Having an array of 100 UDT's is going to be a proper headache to setup with all the jsonGet and jsonSet expressions in a UDT - Am I correct in saying ignition cant reference UDT's inside UDT's yet? as that would make this much easier!

UDTs inside of UDTs work fine in this hare-brained derived tag scheme.

It's all definitely a pain in the ass, though.

I'm going to look at this property binding stuff and see if that should work or could work.

1 Like

Thanks Kevin - Hare-brained definitely describes the whole project I'm on! :rofl: