Way to pull all current alarm configurations of a tag

Hello,

I am working on developing a view that can edit alarm configurations within a perspective view but I am running into an issue regarding pulling the current alarms.

using system.tag.readBlocking I am not able to pull the "/Alarms" section (get "Bad_Unsupported")

using system.tag.getConfiguration I am able to pull alarm configurations that are not part of the initial configuration of the tag; however, I can't get ones that are there by default.

In the past I was able to get those things using readBlocking (as recommended by the documentation); however, this does not seem to be a valid path for alarm configuration.

Has anyone been able to pull the alarm object in its current state rather than the base config via scripting? Is this something that is possible with scripting?

I had a need to bind to certain alarm properties (although directly in perspective, not through scripting) and had the same "Bad_Unsupported" errors. A work around that worked for application was using a tag custom property that then got bound to the alarm property. Then in my perspective project I bound to the tag custom property instead of trying to reach the alarm property directly.

Thank you,

Ill give this a try!

So I was able to figure out a bit of a work around:

Though you can't pull the tagPath/Alarms object, you can pull any singular thing inside of it as long as you know the name of the alarm.

Example:
system.tag.readBlocking("tagPath/Alarms") does not work; however,
system.tag.readBlocking("tagPath/Alarms/alarm1.SetpointA") does.

So you just need to call each property of each alarm out separately.

To utilize this, I made a script that has an array of all of the alarm properties (setpointA, mode, etc) that will first pull the configuration of the tag with system.tag.getConfiguration("tagPath")[0]['alarms'] and then loop through each alarm parameter to pull them all in one system.tag.readBlocking command.

It took a little bit of extra work, but works for my purposes.

Did you notice this exchange resource?