# Creating Alarm into the Data Type

**URL:** <https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [November 7, 2022, 10:07am UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177 "2022-11-07T10:07:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nejdetciritci](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nejdetciritci](https://forum.inductiveautomation.com/u/nejdetciritci)\
**Post date:** [November 7, 2022, 10:07am UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/1 "2022-11-07T10:07:50Z")

</div>

Hi everyone,

I have a problem with data types and alarms,

I created a data type and defined three opc tags, two expression tag for alarms and I generated three alarms at alarms section for defined expression tags.

After creating data type, I created a few instance under Tags folder.  
One of instance uses an alarm in a data type. When I create it I disable the other expression tag and irrelevant opc TAGS.

Another instance also uses an alarm. When I create it I disable a irrelevant opc TAG.

When it's all over, two instance's alarms tags are showing "Evaluation Error". What is the problem? How can I fix it?

Thanks for your help,

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [November 7, 2022, 10:12am UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/2 "2022-11-07T10:12:17Z")

</div>

A quick guess is that your expression tag is failing to evaluate. Is it a big formula?

If you overwrite the instance with just a `true` statement, will the error disappear and trigger the alarm?

---

<div class="post-metadata">

**Author:** ![nejdetciritci](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nejdetciritci](https://forum.inductiveautomation.com/u/nejdetciritci)\
**Post date:** [November 7, 2022, 10:30am UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/3 "2022-11-07T10:30:19Z")

</div>

When I overwrite the instance, expression tags value is changing but it doesn't show at the alarm view.

I checked expression tag's expression section, everything is written correctly. However it doesn't get fixed until I delete the unused ones. I don't want to delete, I want to disable it but if I don't delete it, it doesn't work as I said. If a tag in the data type are deleted, data type loses its significance .

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [November 7, 2022, 11:37am UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/4 "2022-11-07T11:37:54Z")

</div>

I'll use some screenshots.

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

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

Having checked those fields marked by the arrows, you should see an alarm. I'm not sure if you changed your instance locally to make a test. That green dot shows that it is being modified locally

---

<div class="post-metadata">

**Author:** ![nejdetciritci](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nejdetciritci](https://forum.inductiveautomation.com/u/nejdetciritci)\
**Post date:** [November 7, 2022, 12:22pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/5 "2022-11-07T12:22:15Z")

</div>

**Thank you for your interest,**

I think I can't explain my problem because of that I will write step by step.

-START  
-Create a data type (TestDT)  
-Create two folder in data type(TestDT)  
Folder 1 name: Alarms  
Folder 2 name: OPC Tags  
-Create two expression tag in Alarms folder  
Exp. Tag 1 name: Alarms\_Data (short)  
Exp. Tag 2 name: Alarms\_Connection (short)  
-Create three OPC tags in OPC Tags folder  
OPC Tag 1 name: OPC\_Data (short)  
OPC Tag 2 name: OPC\_Error (short)  
OPC Tag 3 name: OPC\_Connection (short)  
-Create 5 alarms in Alarms\_Data (Use Mode Bit State) and write the following in Expression section of Alarms\_Data with binEnc()  
Alarm1: It will look at bit 0 of OPC\_Data (Data1 overflow error)  
Alarm2: It will look at bit 1 of OPC\_Data (Data2 overflow error)  
Alarm3: It will look at bit 2 of OPC\_Data (Data3 overflow error)  
Alarm4: It will look at bit 3 of OPC\_Data (Data4 overflow error)  
Alarm5: It will look at bit 4 of OPC\_Data (Data5 overflow error)  
-Create 2 alarms in Alarms\_Connection (Use Mode Bit State) and write the following in Expression section of Alarms\_Connection with binEnc()  
Alarm1: It will look at bit 0 of OPC\_Error (Motor error)  
Alarm2: It will look at bit 1 of OPC\_Error (Lamb error)  
Alarm3: It will look at bit 2 of OPC\_Error (Low voltage error)  
Alarm4: It will look at bit 3 of OPC\_Error (High current error)  
Alarm5: It will look at bit 0 of OPC\_Connection (PLC Conn. lost)  
Alarm5: It will look at bit 1 of OPC\_Connection (PC Conn. lost)  
-Create two instances  
Instance 1 name: PLC1\_100100NC  
Instance 2 name: PLC1\_100110NC  
-Disable OPC\_Data tag in the instance of PLC1\_100110NC  
-Enter instance's OPC Server and Item Path  
-Watch them  
-FINISH

If you follow this road, you will see an error under the Tag Browser. PLC1\_100110NC will say to you why you create OPC\_Data tag and why don't you use it?

Then you must do these if you want to work it.

-Go to PLC1\_100110NC instance.  
-Open Expression section of Alarms\_Data  
-Delete related things with OPC\_Data  
-Say OK.

Problem was solved.

**BUT**  
I don't want to follow this method.

**AND**  
I wonder that how can I solve it another method?

**Thanks,**

@Kevin.Herron  
@paul-griffith  
@pturmel

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [November 7, 2022, 12:55pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/6 "2022-11-07T12:55:07Z")

</div>

If it's possible, post some screenshots and/or JSON strings for UDTs and tags.

---

<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, 2022, 1:19pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/7 "2022-11-07T13:19:39Z")

</div>

If you have expression tags that depend on a disabled tag, I'm not sure what you should expect. Disable those expression tags, too.

---

<div class="post-metadata">

**Author:** ![nejdetciritci](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nejdetciritci](https://forum.inductiveautomation.com/u/nejdetciritci)\
**Post date:** [November 7, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/8 "2022-11-07T13:51:27Z")

</div>

I am using some alarms in this expression tag so I can't disable this expression tag. @pturmel

---

<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, 2022, 1:54pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/9 "2022-11-07T13:54:41Z")

</div>

How can those alarms ever fire if their ultimate source is disabled? It sounds to me like you are trying to push a square peg through a round hole.

---

<div class="post-metadata">

**Author:** ![nejdetciritci](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nejdetciritci](https://forum.inductiveautomation.com/u/nejdetciritci)\
**Post date:** [November 7, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/creating-alarm-into-the-data-type/66177/10 "2022-11-07T14:24:31Z")

</div>

I just disable the ones I don't want triggered.
