Bug - Bad_Unsupported on tag read of AlarmMetric

Get a null, Bad_Unsupported value when attempting a tag read on any of the /Alarm Metrics from the designer script console. This also seems to hold true for gateway scoped scripts. From prespctive bindings it seems to work as expected but system.tag.read still has issues.

How did you test this? (Project library scripts do not have any scope of their own.)

Sorry, what I meant was a tag event script attempting a tag read, that gets executed on the gateway, right?

Yes, that runs in gateway scope. Could be a bug.

BUT.

IIRC, this new feature is optimized to not create workload on the gateway when nothing is interested in the value, which I take to mean that it will only work for subscribed functionality. Try creating an expression tag that references the alarm metric. That might establish the necessary subscription.

Yeah I'm going to check with the right people later... but I thought these things were bindable and subscribable (expression ref etc...), but if nothing references them they aren't doing work and don't exist.

2 Likes

Yeah thats makes senes that they wouldn't always be updating unless something was subscribed to it, from a performance standpoint.

An expression tag does work. That should be enough for me to get the functionality that I require. Thanks!

1 Like

Yep, Phil and Kevin are both correct. We don't support direct reads of alarm metrics (ie. system.tag.readBlocking('<tag path>/Alarm Metrics.<metric name>), they are bindable and subscribable.

A simple workaround if you needed this functionality specifically would be to create a reference tag to the specific alarm metric you needed, then directly ready the value of that tag as necessary. This would keep the subscription alive, defeating some of the efficiency gains, but would still work.

5 Likes