# 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:** 1\
**Showing post:** 28

<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

---

_[View the full topic](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905)._
