OPC UA struct data type?

Thanks! I was having problems using the Sources/SourceTag as the source for DerivedTags/DerivedTag (in image below). Seeing your post made me look for the relative tag path documentation which explained that i need the following syntax in the source for DerivedTags/DerivedTag.




1 Like


Image above shows the UDT instance with good values :slight_smile:


Path is actually above. 2 dots instead of 3.

1 Like

Is there an example of what the “SourceTag” setup looks like in that above picture? I get that I’m going to read a document data type but what do I put as OPC Item Path? I have a Siemens DB1 with multiple instances of a UDT called DigitalInput where a DigitalInput is made of a Bool, Bool, Time, Int, Int, Bool.

I’m using this link https://docs.inductiveautomation.com/display/DOC79/Siemens#Siemens-ConfiguringSiemensAddressing as a reference for how addressing should occur. It doesn’t address documents. I realize this is DOC79, I’m using version 8.

You’ll want to ignore the directions of using the Siemens driver to connect to the PLC.

My example used a memory tag for source tag to simulate.

If your Siemens PLC has the firmware that includes a built-in opc ua server, you can go under Ignition’s OPC connections, and create a connection to the PLC from there.

From there you will be able to browse the OPC server (from the designer) and actually pull the struct as a tag into Ignition. This tag will appear as a JSON formatted string of key value pairs.

Hope this helps a bit.

If you can indulge me as I’m very unfamiliar with Siemens… The DB, *.xls, has several tabs that seemed to describe the STRUCT you’re referring to. Only one tab has ref. to ‘UDT’… Can you subscribe to the STRUCT in the same way? Or, is the UDT a special way to create a subscribing source?


i’m also using the onboard opcua of siemens for one of my project.

I’m trying to use the method of @Kevin.Herron but when importing a udt with a special type (Like Toff_Time) i get a bad quality in ignition. When deleted it works fine.

Also if you need to get some data into a folder or struct into the udt. How to you need to syntax this properly into the source and value of the derived tag?


I have found why it’s not working.

Iven if you put the ToF_Time as writable, SIemens activate only a part of the sub properties. :triumph:


You cannot have a timer in the struct if you want to read it with OPC UA. Only other structs, atomic member or other UDTs (which also don’t contain timers or other illegal types).

See this thread:


I’ve got the same problem as @nskoog.
i’ve try this solution but without result.

It’s not working when the derived tag is in more than 1 folder level.

Any ideas?


can you provide a screenshot of your tag structure and how you’re configuring your derived tag?

This is my tag structure. I’ve found that each time i add a folder level in the derived Tag path i need to add an extra “…/” in the source tag path.
Then it works.

But is this logical when the sourceTag path doesn’t change?


Yes- because it’s relative to how much you’re nesting. Similar to directory access in linux, you have to direct how many folders out you need to go to reach your destination (think cp commands where you have a copy from x to y).

Normally you’d create a UDT encapsulating that tag structure, then youre relative paths should always be the same.

This is a UDT (Motor 1).
So to have always the same source path i sould put the sourcetag into a UDT and Nesting this udt into the udt containing the derived tags.
I’m correct ?


exactly. this way the source tag and the derived tags will always be relative to one another and your derived path will never need to change.

Hi at all,
I have created derived opc tags as indicated, all UDT and therefore all derived tags work correctly both in reading and writing.

My problem is, I created a button that via script sets 2 derived tags at the same time to value 0 within a parameterized popup:

the script is as follows:

if system.gui.confirm (u'Are you sure? ',' Confirm '):
    event.source.parent.DVC_Popup.C_Moff = 0
    event.source.parent.DVC_Popup.C_Mon = 0

Only the C_Mon tag is set because the values ​​are changed in the same time, i thinkj before the update time of the OPC tag from which the tags are derived.
If between one tag and another I put a delay of 2 seconds the tags are written, I think because I give to driver time to update the OPC tag.

from time import sleep
if system.gui.confirm (u'Are you sure? ',' Confirm '):
   event.source.parent.DVC_Popup.C_Moff = 1
   sleep (2)
   event.source.parent.DVC_Popup.C_Mon = 0
   sleep (2)

Is there any way to avoid inserting this delay? or another way to write derived tags at the same time?


Does the Tag Group these tags belong to have “Optimistic Writes” enabled?

was on false, i put on true but not change issue… :slight_smile:

That should be enough to make it work. How is that script actually causing a write to the tags? Are those custom properties bound to the derived tag or something?

Also what version of Ignition are you using?