# Alarm triggering off a tag status of "Uncertain\_InitialValue"

**URL:** <https://forum.inductiveautomation.com/t/alarm-triggering-off-a-tag-status-of-uncertain-initialvalue/65924>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [November 1, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/alarm-triggering-off-a-tag-status-of-uncertain-initialvalue/65924 "2022-11-01T14:08:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [November 1, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/alarm-triggering-off-a-tag-status-of-uncertain-initialvalue/65924/1 "2022-11-01T14:08:31Z")

</div>

Good day All. I am trying to have an alarm go off when the the tag value is "Uncertain\_InitialValue". In the alarm setup - alarm mode settings - mode I dont not see "Uncertain\_InitialValue" I do see bad but im not getting bad data im getting uncertain data due to the machine being turned off. Its just what the customer wants.

How can I go about having this alarm setup to trigger in this state?

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [November 1, 2022, 3:20pm UTC](https://forum.inductiveautomation.com/t/alarm-triggering-off-a-tag-status-of-uncertain-initialvalue/65924/2 "2022-11-01T15:20:49Z")

</div>

Here is a good thread to read which recommends not to do this and why.

> [@How to locate the number 'value' of a Tag's Data Quality](https://forum.inductiveautomation.com/t/how-to-locate-the-number-value-of-a-tags-data-quality/26840/9):
>
> You shouldn’t use string comparison or integer comparison. In the vast majority of cases, it’s preferable to use the dedicated methods on [QualityCode](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.14/com/inductiveautomation/ignition/common/model/values/QualityCode.html#isGood()) - isGood(), isBad(), etc directly: system.tag.read("TagPath").quality.isGood() Or, thanks to Jython: system.tag.read("TagPath").quality.good If you actually need to check for a specific quality code, then you should use is against a static member of the QualityCode class: from com.inductiveautomation.ignition.common.model.values import Quality…

Long story short just checked if its good or bad.

It sounds like you want to know if the device is on or off. In that case I'd recommend a heartbeat in the device. And checking in Ignition if stays stagnant for x amount of time the device is obviously off.
