# Alarm acknowledged script on tag

**URL:** <https://forum.inductiveautomation.com/t/alarm-acknowledged-script-on-tag/111002>\
**Category:** Ignition\
**Tags:** scripting, ignition83\
**Created:** [September 26, 2025, 11:22am UTC](https://forum.inductiveautomation.com/t/alarm-acknowledged-script-on-tag/111002 "2025-09-26T11:22:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.toderici](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@m.toderici](https://forum.inductiveautomation.com/u/m.toderici)\
**Post date:** [September 26, 2025, 11:22am UTC](https://forum.inductiveautomation.com/t/alarm-acknowledged-script-on-tag/111002/1 "2025-09-26T11:22:51Z")

</div>

context: im migrating an old WinCC 7.2 project to Ignition in which there are alarms that fire on set bits of a Word tag and there are also bits on that same Word tag that are used for acknowledgment for the PLC and HMI

for example: when bit 0 is set the alarm fires and when the user acknowledges it, it sets bit 1

i made the following script on a Memory Tag in Ignition to test my idea but the value won’t change, bit 1 wont be set.

```python
def alarmAcked(tag, tagPath, alarmName, alarmEvent, alarmPath, ackedBy, missedEvents):

	val=tag.value | (1 << 1)
	system.tag.writeAsync([tagPath.value], [val])

```

- what i expect to happen: the value to change to 3 (0011)
- what actually happens: the value stays at 1 (0001)

i also tried with writeBlocking but i still dont get the expected outcome

any ides?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 28, 2025, 2:27am UTC](https://forum.inductiveautomation.com/t/alarm-acknowledged-script-on-tag/111002/2 "2025-09-28T02:27:06Z")

</div>

Are there any script errors on the tag under its diagnostics?

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [September 28, 2025, 5:25am UTC](https://forum.inductiveautomation.com/t/alarm-acknowledged-script-on-tag/111002/3 "2025-09-28T05:25:20Z")

</div>

Try this:

```python
def alarmAcked(tag, tagPath, alarmName, alarmEvent, alarmPath, ackedBy, missedEvents):
	val=tag.value.value | (1 << 1)
	system.tag.writeAsync([tagPath], [val])

```
