Indirection and templates for valve animation and control

I am an ignition novice.
I want to create a template that i can then place on a graphic page to represent a process valve.
I would like the colour of the valve symbol on the template to represent the state of the valve
eg. Grey = closed
Blue = fail to open
Red = fail to close
Green = open.

I can generate these states as an integer value in a tag say Valve12345 where 0 = closed, 1 = fail to open
2 = fail to close, 3 = open.

I can then drag and drop the valve tag onto the instance of the template and this works great.

Now I would like to be able to open a popup window by clicking on the symbol on the graphic with buttons to say open and close the valve. I would like to bind these buttons to tags based upon the tag that was dropped onto the instance of the template.

EG the open button would be bound to tag Valve12345Open
and the closed button to tag Valve12345Close

Can you advise how this may be achieved.

Have you seen the “Design like a Pro” webinar series? The second half of the second video provides an example that is very similar to what you’re asking for.

youtube.com/watch?v=hbgJRlxAVgY
youtube.com/watch?v=V8LGl7JSNLE

Unfortunately our IT dept blocks access to youtube may have to view at home tonight

What you should do is add a template parameter called tagpath that is a string. Don’t expose the integer value as a parameter (this is what you have right now since you drag the tag onto it). On your graphic the color will be bound to an indirect tag using the new tagpath. That way you have the tagpath that you can pass into a popup window.