# OPC UA struct data type?

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905>\
**Category:** Ignition\
**Created:** [July 26, 2019, 1:13pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905 "2019-07-26T13:13:17Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 15, 2021, 8:35am UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/22 "2021-01-15T08:35:41Z")

</div>

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?

Regards

---

<div class="post-metadata">

**Author:** ![Stevenson.Yuan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Stevenson.Yuan](https://forum.inductiveautomation.com/u/Stevenson.Yuan)\
**Post date:** [January 15, 2021, 3:26pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/23 "2021-01-15T15:26:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 15, 2021, 4:43pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/24 "2021-01-15T16:43:59Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f388e1afd258bbb8df96bbc679ba047152a6b31f.png)  
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?

Regards

---

<div class="post-metadata">

**Author:** ![Stevenson.Yuan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Stevenson.Yuan](https://forum.inductiveautomation.com/u/Stevenson.Yuan)\
**Post date:** [January 15, 2021, 4:57pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/25 "2021-01-15T16:57:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 15, 2021, 5:27pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/26 "2021-01-15T17:27:39Z")

</div>

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 ?

Regards

---

<div class="post-metadata">

**Author:** ![Stevenson.Yuan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Stevenson.Yuan](https://forum.inductiveautomation.com/u/Stevenson.Yuan)\
**Post date:** [January 15, 2021, 7:25pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/27 "2021-01-15T19:25:48Z")

</div>

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.

---

<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:** [March 23, 2021, 3:53pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/28 "2021-03-23T15:53:16Z")

</div>

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.

 ![2021-03-23 16_40_50-Window](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/6160459121ad424c375b0d42581d03aa0f2f1dc3.png)

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:

```auto
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.

```auto
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?

Thanks

---

<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:** [March 23, 2021, 3:55pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/29 "2021-03-23T15:55:05Z")

</div>

> [@m.pelagatti](#):
>
> or another way to write derived tags at the same time?

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

---

<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:** [March 23, 2021, 4:03pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/30 "2021-03-23T16:03:15Z")

</div>

> [@Kevin.Herron](#):
>
> “Optimistic Writes”

 ![2021-03-23 17_01_35-Tag Group Editor](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bb88c8db9b330a20d461f35a46d7aa08a4c1708e.png)

Hi,  
was on false, i put on true but not change issue...... 🙂

---

<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:** [March 23, 2021, 4:05pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/31 "2021-03-23T16:05:30Z")

</div>

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?

---

<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:** [March 23, 2021, 4:19pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/32 "2021-03-23T16:19:55Z")

</div>

I use version 8.1.3.  
This tags is inside popup have custom properties with udt . Button set with script this property…

i think problem isn’t in popup,  
I tried to click quickly in less than 1s in the tag browser to set the tags and always the last one gets changed.

I need to restart OPC connection before change “optimistic write”?

![2021-03-23 17_13_29-Window](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/4/d4cfb59a13b6b227fc48c522a016c8713c8aae4f.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:** [March 23, 2021, 4:21pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/33 "2021-03-23T16:21:26Z")

</div>

> [@m.pelagatti](#):
>
> I need to restart OPC connection before change “optimistic write”?

No that shouldn't be necessary. Let me see if we can reproduce this here, it's possible that something is broken right now.

---

<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:** [March 23, 2021, 4:24pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/34 "2021-03-23T16:24:31Z")

</div>

Ok thanks,

if i make this two tag not derived but OPC with correct path ( but it is not performing as explained in post above) it work perfectly.

My opc server is S7-1500 siemens.

---

<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:** [March 23, 2021, 4:40pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/35 "2021-03-23T16:40:48Z")

</div>

Hmm. I cannot reproduce this unfortunately. I think you will have to call support and open a ticket so this can be tracked and investigated.

Are you running the Designer on a different computer than the Ignition Gateway by any chance?

---

<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:** [March 23, 2021, 4:44pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/36 "2021-03-23T16:44:36Z")

</div>

> [@Kevin.Herron](#):
>
> Are you running the Designer on a different computer than the Ignition Gateway by any chance?

No is in the same computer...

> [@Kevin.Herron](#):
>
> Hmm. I cannot reproduce this unfortunately. I think you will have to call support and open a ticket so this can be tracked and investigated.

Ok thanks....

---

<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:** [March 24, 2021, 11:20am UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/37 "2021-03-24T11:20:24Z")

</div>

Hi,  
today, i don’t know why, I can set the 2 bits C\_Mon and C\_Moff at the same time, but if I change a value from the plc, the status in the tag is not read …

The strange thing is that if I force it from the browser tag I write and read …  
if instead I set the same tag in the plc, it does not change the status in the browser tag.

Today I just turned the system back on without making changes since yesterday …

PS: if i’m not force tag from struct in tag browser, i can read from plc  
if i force one time, write to plc, but nor read any tag of struct

---

<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:** [March 24, 2021, 11:32am UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/38 "2021-03-24T11:32:38Z")

</div>

Can you try editing your gateway’s ignition.conf and adding this parameter to the “Java Additional Parameters” section:

```auto
-Dignition.tags.processbackfill=true

```

It would end up looking something like this:

```auto
# Java Additional Parameters
wrapper.java.additional.1=-Ddata.dir=data
wrapper.java.additional.2=-Dignition.tags.processbackfill=true
#wrapper.java.additional.2=-Xdebug
#wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000

```

You will have to restart your gateway for this to take effect.

---

<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:** [March 24, 2021, 12:06pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/39 "2021-03-24T12:06:18Z")

</div>

> [@Kevin.Herron](#):
>
> wrapper.java.additional.2=-Dignition.tags.processbackfill=true

perfect... now work !!!! 🤩

Thanks a lot...

---

<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:** [March 24, 2021, 1:21pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/40 "2021-03-24T13:21:54Z")

</div>

> [@Kevin.Herron](#):
>
> wrapper.java.additional.2=-Dignition.tags.processbackfill=true

I had the same issue and just thought it is what it is. What does this process backfill do?

---

<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:** [March 24, 2021, 1:25pm UTC](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/41 "2021-03-24T13:25:48Z")

</div>

In something like 8.1.1 or 8.1.2 a change to the tag system was made where values that come in with timestamps older than the current one are treated as historical values and stored if history is on, but otherwise ignored when it comes to updating the value or running scripts etc…

This flag is an escape hatch to revert to the previous behavior, and it’s a good thing it’s there because the change wasn’t very well thought out and we’re chasing down bugs and side effects of it right now.

[Previous page](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905.md?page=1)

[Next page](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905.md?page=3)
