# Reading from a OPC UA device, synchronization issues

**URL:** <https://forum.inductiveautomation.com/t/reading-from-a-opc-ua-device-synchronization-issues/57223>\
**Category:** General Discussion\
**Created:** [March 15, 2022, 5:42pm UTC](https://forum.inductiveautomation.com/t/reading-from-a-opc-ua-device-synchronization-issues/57223 "2022-03-15T17:42:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 15, 2022, 5:49pm UTC](https://forum.inductiveautomation.com/t/reading-from-a-opc-ua-device-synchronization-issues/57223/2 "2022-03-15T17:49:37Z")

</div>

You should definitely use two tags for the handshaking whenever possible. Race conditions are possible when one tag is written from both sides.

One approach is described here:

> [@Gateway tag change issue](https://forum.inductiveautomation.com/t/gateway-tag-change-issue/21697/8):
>
> To write each tag from only one direction: PLC sets trigger tag Script runs on trigger tag change, does stuff, and sets handshake tag PLC clears trigger tag when it sees handshake tag Script runs on trigger tag change and clears handshake tag This should make a race condition pretty unlikely,

---

_[View the full topic](https://forum.inductiveautomation.com/t/reading-from-a-opc-ua-device-synchronization-issues/57223)._
