# How can I create an activated alarm counter inside the alarm pipeline?

**URL:** <https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 11, 2024, 4:29pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698 "2024-04-11T16:29:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Eduardo\_Mar\_Gal](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jose\_Eduardo\_Mar\_Gal](https://forum.inductiveautomation.com/u/Jose_Eduardo_Mar_Gal)\
**Post date:** [April 11, 2024, 4:29pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/1 "2024-04-11T16:29:25Z")

</div>

Hi, I want to create an active alarm counter, an put it inside the alarm pipeline, the main idea is to count and verify that a specific alarm was activated for 'n' times (lets say 3 times for example), an after that to send the notification to a roster.  
I am using an Ignition version: 8.1.35

---

<div class="post-metadata">

**Author:** ![eddie\_johnson](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@eddie\_johnson](https://forum.inductiveautomation.com/u/eddie_johnson)\
**Post date:** [April 15, 2024, 12:19pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/2 "2024-04-15T12:19:10Z")

</div>

Not exactly what you want but a place to start maybe. This counts critical alarms and at 5 send notifications. The set property expression is "{numTimes} + 1".

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/0/10d4fcac2e7b6dd5df1750439cb55af04d84ed65.png)

---

<div class="post-metadata">

**Author:** ![Jose\_Eduardo\_Mar\_Gal](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jose\_Eduardo\_Mar\_Gal](https://forum.inductiveautomation.com/u/Jose_Eduardo_Mar_Gal)\
**Post date:** [April 16, 2024, 6:24pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/3 "2024-04-16T18:24:16Z")

</div>

Hi Eddie, I think in this solution if the alarm is active and priotiry=4 the numTimes counter does a loop until the number reach 5 and the sent the notification, but I can't count the times the alarm goes active.

I wonder if can I use a counter from the alarm tag like the "ClearUnackCount" and use it in the pipeline

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f35aac485008441a2bd7b56adaf858f79c88d70d.png)

Anyway thanks for your feedback

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [April 17, 2024, 1:06am UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/4 "2024-04-17T01:06:46Z")

</div>

You could create an 'on condition' alarm and use that count in the expression, but the count won't reset so you'll need some logic to determine if the counter is a multiple of 5 (or whatever the threshold is).

It would probably be better to have a separate tag which counts up when the main alarm is active. Trigger an alarm on this new tag when the value reaches the threshold and reset the count.

---

<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:** [April 17, 2024, 5:40am UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/5 "2024-04-17T05:40:17Z")

</div>

> [@amy.sudibyo](#):
>
> and reset the count.

Possibly you'd want to reset the count whenever it's acknowledged maybe as well 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Jose\_Eduardo\_Mar\_Gal](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jose\_Eduardo\_Mar\_Gal](https://forum.inductiveautomation.com/u/Jose_Eduardo_Mar_Gal)\
**Post date:** [April 22, 2024, 5:51pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/6 "2024-04-22T17:51:31Z")

</div>

Hi Amy, yes I think creating a new tag is better, I will do that. Thanks.

---

<div class="post-metadata">

**Author:** ![Jose\_Eduardo\_Mar\_Gal](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jose\_Eduardo\_Mar\_Gal](https://forum.inductiveautomation.com/u/Jose_Eduardo_Mar_Gal)\
**Post date:** [April 22, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/how-can-i-create-an-activated-alarm-counter-inside-the-alarm-pipeline/88698/7 "2024-04-22T17:53:42Z")

</div>

Yes mminchin, I will reset the counter when it comes acknowledge. thanks
