LESSON

Template Overview

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 8.1

Transcript

(open in window)

[00:00] HMI SCADA applications generally have a fair amount of repetition in their screens. In any given application, it is common to have many identical sets of components repeated several times over with a different source driving the data in each set. In ignition, these sets of components are called templates. Templates mean you can define a graphical display called the master template. You can then create instances of this master template anywhere across your projects. If you choose to make a change to the master template, this change will then be reflected in all of its instances. For this reason, using templates early in your projects development for any repeating graphical displays can save a significant amount of time. Templates are created from the ignition designer where I am currently. From the project browsers vision section, we can access all the templates available for this project to use. I've created two folders for this example.

[00:00] [01:00] One with templates to find locally in this project and templates that are being inherited from this project's parent project. You can learn more about inheritance in the project inheritance lesson in Inductive University. For this lesson, we just have to keep in mind that the grayed out templates are inherited templates from a different project. And that these templates can only be edited from their project of origin. As with any inherited resource, I can right click on it and I can override it creating a local copy of this template here. Since this is a local template override, it is no longer grayed out. I do not want to do this so I will simply delete this newly created local copy to see the inherited template tickets place. Again, I can only override this template from this project since it is inherited. To change this template, I will have to go back to its project of origin. Local templates are not grayed out. And since this is their project of origin, they can be edited right here on the spot.

[01:59] Regardless of which template type you are looking at local or inherited, I can right click in the template section of the project browser and choose to create a new template. I can also create folders for template organization and I can also export templates to be shared across multiple projects or ignition gateways even. Creating a template instance is as easy as dragging and dropping. I can take my motor B template and drag it onto my vision window and just like that, I have created an instance of motor B's master template on this window. This is very similar to dragging and dropping one of our existing vision components like an easy chart or a power table. This is because the template itself is a user defined component which will have its own properties and settings associated with it. Since templates are user defined you can create your own custom properties on your templates similar to custom properties on standard vision components. With one of my template instances selected, I can head down to the property editor here to see all of its properties.

[03:00] And at the bottom, you will see this templates custom properties highlighted in blue. In my case, my custom property is a motor's number. Meaning that whatever number this property is set to that will be the motor that my template will display information for. I can set it to one to see motor one data, two to see motor two data and so on. When I set this value to zero, you will know that some of the components in my template show error overlays. This is because as you can see from my type browser, motor zero does not exist. In addition, UDT's can be tied to templates. What do I mean by this exactly? You can actually tell your templates which UDT they are associated with. This ultimately allows you to create template instances by dragging and dropping UDT instances into your vision windows. I will do that by dragging one of my valve UDT instances here onto my vision window. And as you can see, I can create a vision screen that shows information for all my valves in a matter of seconds once my templates are created and configured.

[04:06] I can also double click on any template instance and I will be immediately taken to its definition like so. From the template definition, I can do something like add a second valve to the template by duplicating the existing valve symbol. Once I close my template window and select to save my changes, I will see this change propagate to all my existing valve template instances. The fast deployment of changes to all template instances from their template master and the ability to efficiently repeat visualization components makes templates a fundamental part of HMI SCADA design using ignition. In future lessons, we will dive deeper into template configuration and further explore how they can be used in an ignition application.

You are editing this transcript.

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