Alarm Ack Status animation

I’m trying to animate a Template object when the tag is:

a) In Alarm - Change the back ground colour
b) UnAcked -Blink a rectangle that surrounds the numeric display in the template.

I’ve got the colour change working. I’ve added a custom prarameter that feeds in my UDT.

The Alarm boolean has a list of sub tags that show in the tag browser and I’d like to use

Tag.Alarm.AlarmActiveUnackCount > 0 as my animation trigger…

The problem is that these child tags don’t pass into the template. I’ve searched through the manual and forum and can’t find any solution to this.

Any suggestions?

Just to clarify, when you say “sub tags”, do you mean the blue stuff, like “Value”, “Documentation”, “Name”, “Quality”, etc?

If so, then the way that I would go about it is to pass in the tagpath to the alarm tag, rather than passing in the tag itself. Then, do indirect bindings to all of the properties you need.

One more thing: you might want to run some tests with AlarmActiveUnackCount just to make sure it does what you think it does. If you’re looking for the number of active and unacked alarms in general, then you will probably have to do something fancy with system.alarm.queryStatus(…).

Thanks Zac,

Yes, the blue tags.

The intent is to show when a transmitter is in alarm and the unackcount allows me to blink when it is new or unacknowledged.

I ended up using the tagpath variable that came in with the UDT and I was able to build up the full tag and make it work.

tag({BSI_AI.BSI_AI::Meta.TagPath} + “/HH_Alarm.AlarmActiveUnackCount”) > 0

The UDT is fairly large and is needed for the Faceplate so I didn’t want to pass in separate tags to do this.

Thanks for your reply.

Mike

Excellent! Glad you got it working. One more tip, even though it sounds like you’ve got it figured out.

If you plan to show several instances of this template on the display at once, then since you’re passing in a large UDT, it may end up being slow. When you pass a UDT into a template, the template subscribes to all of the parts of the UDT even if they aren’t being used, so it can result in slow load times on the client.

That’s the reason I suggested using the tag path. this way would mean you make a string parameter and pass in the path to the base UDT instance, and then do indirect bindings to all of its parts.

Anyway, test out what you’ve got and if it works well, then no problem. But if you encounter a lot of client slowness, then this is something you can try.

Thanks Zac,

I see your point. I’ll look into doing that. I’m building up a framework now and want to get it right.

Any performance gains now will pay off later.

[quote=“zacslade, post:4, topic:14687”]
When you pass a UDT into a template, the template subscribes to all of the parts of the UDT even if they aren’t being used, so it can result in slow load times on the client.[/quote]
FWIW, this is the reason I never use UDT parameters.

PTURMEL and ZacSlaDE:

I just tested this and confirmed the behaviour.

72 Tags to client for Direct Binding and 5 for Indirect. 2 different tags with the same UDT template.

This is a big item to note. It isn’t mentioned in the video’s anywhere.

We just finished an app with all direct binding and this would have been good to know.

At least my future apps will be better.

Thanks for the hints. It’s very much appreciated!

Mike

1 Like

Question:

I’ve got the tagpath method working well in my template and popups. I’m struggling with being able to write a valve back to the PLC.

Using the Tag() function allows me to display a tag with no issues. Can’t figure out how to write it back using a numeric entry field.

The easiest way to write back is to use the bidirectional checkbox on an indirect tag binding. (-:
You’ll have to use a custom string property to contain the dynamic part of the tag path and reference it in the indirect tag binding, in lieu of using the tag() expression function.

Ahhh, Thanks.

I was going down a rabbit hole making it a lot more complicated that I needed to. Way to many options with this software. Just allows me to get in trouble. :slight_smile:

Thanks again.