# Editing Alarm Priorities via system.tag.configure

**URL:** <https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [December 2, 2022, 9:39pm UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197 "2022-12-02T21:39:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [December 2, 2022, 9:39pm UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/1 "2022-12-02T21:39:52Z")

</div>

Hello,

Has anyone used system.tag.configure to edit alarm priorities on the fly from a perspective or vision screen? If so would you be able to share some examples?

Thanks,

Frank

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 3, 2022, 1:05am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/2 "2022-12-03T01:05:42Z")

</div>

See this doc,  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.configure](https://docs.inductiveautomation.com/display/DOC81/system.tag.configure)

The below script was taken from the doc, I added priority. Keep in mind that doing this will wreak havoc when using UDTs, it will set the alarm as overridden.

```auto
# The provider and folder the Tag will be placed at. 
baseTagPath = "[default]"
 
# Create a list of alarms, where each alarm is a Python dictionary.
alarms = [
            {
                "name":"My scripting alarm",               
                "mode":"AboveValue",               
                "setpointA":10,
                "priority": "Low" #Added priority
            }
        ]
 
# Configure the list of Tags. We're only interacting with a single Tag, but still need to pass
# a list as an argument.
tags = [
            {
                "alarms":alarms,
                "name":"myTag"
            }
        ]
 
# Abort if this example attempts to overwrite any of your existing Tags.
collisionPolicy = "a"
 
# Create the Tag.
system.tag.configure(baseTagPath, tags, collisionPolicy)

```

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [December 3, 2022, 1:40am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/3 "2022-12-03T01:40:13Z")

</div>

Great point about it setting the alarm as overridden. Which is cumbersome. IMHO changing an alarm priority should not force a break in inheritance. I would also like to be able to change the priority with a simple tag write instead of the tag.configure.

Frank

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 3, 2022, 2:09am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/4 "2022-12-03T02:09:07Z")

</div>

I believe they are working on enhancements like that, but from what I understand they are a ways out.

To my knowledge there are only two properties you can write to using a tag write:

1. Enabled
2. Setpoint

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [December 3, 2022, 2:22am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/5 "2022-12-03T02:22:43Z")

</div>

It really warrants thinking about keeping alarms outside of udts and using primitive data types. Especially if you plan to allow priority configuration during runtime.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 3, 2022, 2:49am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/6 "2022-12-03T02:49:12Z")

</div>

This post may be helpful,

> [@Change UDT alarm priority dynamically without alarm override?](https://forum.inductiveautomation.com/t/change-udt-alarm-priority-dynamically-without-alarm-override/46782):
>
> Does anyone have a strategy for changing the priority of a UDT alarm without overriding the alarm? My UDT has a few alarm tags whose priorities will vary by instance. Right now my workflow is to override the alarm and set the priority for each instance. This seems flawed long term, as any UDT changes to the alarm (label updates, notes, etc) won’t propagate to any overridden alarm. I’ve tried doing expression/tag bindings to custom properties and using UDT parameters, but no luck. Anyone have s…

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [December 3, 2022, 3:04am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/7 "2022-12-03T03:04:46Z")

</div>

Great information. Thanks for the link. I’ll give it a shot.

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [December 4, 2022, 3:15am UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/8 "2022-12-04T03:15:39Z")

</div>

I am using double integer alarm words with 32 alarms  
configured using bit positions. I added an integer array tag to my UDT to hold the priority for each alarm 0-4. I then bind the priority of each alarm to priority[bitposition]. Works perfectly, thanks again!

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [November 14, 2024, 2:11pm UTC](https://forum.inductiveautomation.com/t/editing-alarm-priorities-via-system-tag-configure/67197/9 "2024-11-14T14:11:15Z")

</div>

Very late to this party...  
Bindings are permitted on alarms and are especially useful within a UDT. If each instance might require a different alarm severity, consider creating a binding to a new parameter (pPriorityAlm, pPriorityAlmHH, etc.) on that same UDT, give it a valid default value ("High", "Critical", etc.), then change the priority of each instance as needed (w/ `system.tag.configure` OR `system.tag.writeBlocking`).
