# Transaction group doesn't reset tag

**URL:** <https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277>\
**Category:** Ignition\
**Created:** [February 1, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277 "2023-02-01T14:33:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelly.draehn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kelly.draehn/32/21474_2.png) [@kelly.draehn](https://forum.inductiveautomation.com/u/kelly.draehn)\
**Post date:** [February 1, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/1 "2023-02-01T14:33:57Z")

</div>

Hi All!

I've noticed this on quite a few applications. I have a latched tag on the PLC which is used to trigger the execution of a transaction group. I have the transaction group set to reset the trigger after executing and 99% of the time that works. Occasionally though I will find the trigger stuck on and therefore will prevent execution of the transaction group. I have added some event code:

```
from time import sleep

if currentValue.value == True:
	sleep(1)
	if system.tag.readBlocking(['[default]XXX/GoodPartRightTrigger'])[0].value == True:
		system.tag.writeBlocking(['[default]XXX/GoodPartRightTrigger'],[False])

```

To manually flip it off if it's stuck on for more than a second, but this seems like a clugey fix. Is there a better way to resolve this issue?

Thanks!  
-Kelly

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 1, 2023, 2:46pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/2 "2023-02-01T14:46:13Z")

</div>

You are probably getting into a race condition with the read/write for OPC. I'm not up on the technical side of things on exactly why.

The way to fix this is to use an integer to trigger, and then have an integer handshake as a response.

So when the trigger happens in the PLC, increment the trigger integer by 1, roll over as needed, and then have the transaction group handshake a value back to a status integer. When you see that handshake to be a specific value, then clear the internal PLC trigger and reset the status.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 1, 2023, 3:06pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/3 "2023-02-01T15:06:13Z")

</div>

This kind of race condition is possible any time two different devices write to the same tag in normal operation. The PLC should turn the trigger boolean off, not Ignition (presumably, after it sees the handshake bit). Ignition should turn off its own handshake bit when it sees the trigger boolean turn off. (Use an event script on the trigger tag for this part.)

---

<div class="post-metadata">

**Author:** ![kelly.draehn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kelly.draehn/32/21474_2.png) [@kelly.draehn](https://forum.inductiveautomation.com/u/kelly.draehn)\
**Post date:** [February 1, 2023, 3:11pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/4 "2023-02-01T15:11:11Z")

</div>

This is great info, thank you!

---

<div class="post-metadata">

**Author:** ![Matjaz\_Furlan](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Matjaz\_Furlan](https://forum.inductiveautomation.com/u/Matjaz_Furlan)\
**Post date:** [November 6, 2024, 4:41pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/5 "2024-11-06T16:41:00Z")

</div>

Hi... i have the same issue... Can you describe this solution with examaple maybe... Thank you and kind regards...

---

<div class="post-metadata">

**Author:** ![Matjaz\_Furlan](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Matjaz\_Furlan](https://forum.inductiveautomation.com/u/Matjaz_Furlan)\
**Post date:** [November 7, 2024, 6:47am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/6 "2024-11-07T06:47:10Z")

</div>

Hi!  
You did this script on tag directly (on value change)?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 7, 2024, 1:40pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-reset-tag/69277/7 "2024-11-07T13:40:45Z")

</div>

The script that resets Ignition's success/failure handshake bits can be on the trigger tag's valueChange event, but must use `system.tag.writeAsync()`, not `system.tag.writeBlocking()`. The latter can stall and hurt overall tag event processing.
