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,
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?
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 .
I'll use some screenshots.
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
Thank you for your interest,
I think I can't explain my problem because of that I will write step by step.
-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
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
Problem was solved.
I don't want to follow this method.
I wonder that how can I solve it another method?
If it's possible, post some screenshots and/or JSON strings for UDTs and tags.
If you have expression tags that depend on a disabled tag, I'm not sure what you should expect. Disable those expression tags, too.
I am using some alarms in this expression tag so I can't disable this expression tag. @pturmel
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.
I just disable the ones I don't want triggered.