AVEVA Plant SCADA

Customer voice & ideas portal

Use TagInfoEx() to check whether an alarm exists

If you have an equipment type with an item and this creates a variable tag and an alarmtag you could use the TagInfoEx() function to check whether this item has an alarm defined. Let me give an example:


Equipment:Motors.M1

Item:Run

Variable Tag Name:vtgM1_Running

Alarm Tag Name:diaM1_Run


Normally I would advise to keep the Item names in the variable and alarm tag names the same, so vtgM1_Run instead of vtgM1_Running, but sometimes this is the case.


If you want to know whether the tag has an associated alarm you can use:

TagInfoEx("diaM1_Run.ON",0)

But you can't use the equipment.item style:

TagInfoEx("Motors.M1.Run.ON",0) <- This would be nice

  • Guest
  • Apr 17 2023
Idea business value

People are using this in callback functions of the TagSubscribe() function. The point is that you have to convert the variable tag name into the alarm tag name. If these are equal except for the prefix (vtg and dia in the example) you can convert it easily by using StrReplace(), then you can use the TagInfoEx("diaM1_Run.ON",0), but that's not always the case.

If you start an alarm browsing session in every callback it can have a very big impact on the performance of the system.

Idea priority 3 – Some use to my company
  • Attach files