Description

Templates are a simple but very powerful feature that you can use with your Vision windows. Using Templates, you would define the graphics and parameters in one place, called the Master Template. You then create instances throughout your project that update whenever the master/parent template is changed.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] HMI SCADA systems typically have a fair amount of repetition in their screens. It is common to have many similar sets of components repeated several times over with a different source driving the data in each set. At Ignition, we call these sets templates. Templates are created in one of two different locations in the Designer. The first is under the Project section over here in the Project browser, if I expand this. And I scroll down past my Windows, there is a Template section down below. The second location, if I come back up, I'll go to my Global section here, I'll expand this. And you'll see that there is another there's a Shared Templates section. The difference between the two areas is how accessible the templates are. Templates in the Project section can only be used in this one project, while the Global section here allows me to use these same templates in any project on this gateway. Regardless of which location we're looking at, I can right-click and I can create new templates or I can create folders to help keep myself organized. Creating a template is as easy as dragging and dropping. I can take my temperature gauge here, drag and drop it onto my window and it will create the template just like that. Very similar in concept to dragging and dropping a standard Vision component from the Component palette. The template itself is a component with its own properties and settings. Additionally, you can create your own properties on the template similar to custom properties on standard Vision components. So, if I head down to the Property Editor here, if I scroll down, you'll see that there is a Temp Property here. If I go ahead and change this to something other than zero and enter, you can see that the dial updated as well as the LED display here changed. I can also bind this property to a tag by simply dragging and dropping a tag. So, if I come over to this OBC tag here, drag and drop it down to Temp, and you can see that the value now reflects what is on the tag. The two are linked now. Aside from tags, I can also use expressions or SQL queries to have these template properties automatically determine their value. To make this even easier, I can also drag and drop tags directly from the Tag browser onto my workspace here. Aside from the normal options I would get from the Designer, I can also create templates. So, if I stuck my gauge, I can create a new temperature gauge that is bound to the tag I just dragged onto the window. Going to delete this template here. I'm going to scroll down to my Tag browser because I can also bind templates to UDT's. I have these tank UDT instances, I can drag and drop them down to create a template. In this case, the Designer knows that I want this template to be created when I drag and drop this type of UDT. So I can go ahead and just create a couple real quick. You can see how easy it is for me to build this screen. The best part about templates is that changes can be rolled out very quickly. If I double-click on one of the instances, so, I'll double-click on my Tank 100 here, the Designer takes me to the Master Template here. I'm going to make a quick change here. I'll resize my cylindrical tank. I'll duplicate that same component. Now there's two of them here. I'll go ahead and head back to my window where my instances are. And you can see that all of my instances have updated to reflect the new change on the Master.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.

close

Share this video