Design Like a Pro: Using Templates in HMI/SCADA Projects

Using Templates in HMI/SCADA Projects

52 min video  /  54 minute read
 

About this Webinar

Developing HMI/SCADA projects involves a heavy amount of repetitive tasks. Copying and pasting repeated components over and over is time-consuming, tedious, and sets you up for more problems in the future.

In this "Design Like a Pro" webinar, an HMI/SCADA expert from Inductive Automation explains some of the most powerful methods for using templates to accomplish the same goal in a fraction of the time.

Webinar Transcript

0:00
Don: Good morning everyone and welcome to today's webinar, Design Like a Pro: Using Templates in HMI/SCADA Projects. We appreciate you joining us this morning. I think we have a really good presentation and a lot of demos, some really good information to share with you today so let's go ahead and get started. My name's Don Pearson. I'm Chief Strategy Officer for Inductive Automation and I'll just serve as the moderator for today's webinar and I wanna start off just by briefly introducing our company, a little bit about our software and then I will introduce our guest speaker and turn it over to him.

00:34
Don: Today's webinar, to many of you who have attended a number of these, is a part of our Design Like a Pro Series. It's a series of webinars, white papers, which we started I think about four years ago now and the goal we had is really just helping industrial automation professionals to create better SCADA and HMI projects.

00:55
Don: Previous titles in the series are: Laying the Foundation, Developing with Speed and Precision, Launching Projects, SCADA Alarming and HMI optimization, all of which you can get. You can have access to. If you have not been able to attend all of them, they're certainly archived and you can do the entire series when you... At your own time.

01:16
Don: Today's webinar continues the series by showing different ways to make your development much more efficient by using templates. Most of the principles we'll show you can be applied to whatever SCADA software you use but we'll be showing you how to do them in Ignition. So here's our agenda in brief here for the webinar. We'll present you with some principles and practices for using templates.

01:36
Don: A little background on our company, for those of you who are new to Inductive Automation, founded in 2003, we're extremely pleased with response to our products and to our approach to the market and to our business model from integrators and industrial organizations across the world and we're really pleased to have the opportunity to serve the HMI, SCADA and MES software needs of tons of enterprise across many industries. We hope that we'll be able to contribute to a fundamental change in the industrial software market, both in terms of technology and also how business is done and that's really part of the mission and the purpose of Inductive Automation. It really stems from the culture established by Steve Hechtman, our founder and President.

02:23
Don: Software now has really got a pretty far reach. Inductive Automation's Ignition platform has been adopted and installed in over 90 countries. Almost any industry you can think of, oil and gas, water, wastewater, food and beverage, government, transportation, packaging, databases, data centers, many other applications. We have over 1250 integrators who are supporting that across those countries and we've got pretty good penetration. I think 30% of companies in Fortune 100 and 20% of Fortune 500 are trusting Ignition to meet their very high standards that they have for their HMI, SCADA and MES systems and they're continuing to expand within that market price.

03:02
Don: Briefly, to say why, I think one of the major reasons that you're seeing such broad application across so many industries and adoption of Ignition platform is 'cause we really strive with the platform to give our customers the tools to build anything they can envision and frankly, we're often amazed at our Ignition Community Conference and the interactions we have with our customers and what they end up building. Ignition is a full HMI, SCADA, MES solution that you can also use to build any kind of industrial automation project you may have before you.

03:33
Don: It's full-feature designer makes it really simple to develop practically any kind of industrial application and its server-centric web deployment model is flexible enough for just about any architecture that you may be facing and scale enough for companies of any size to get started and scale as they expand. So we're actually very pleased that Ignition's been able to be used by you to empower all sorts of solutions for all sorts of enterprises across all sorts of industries.

04:04
Don: Now, I'd like to... You're gonna see a little of that today, at least from the view point of templates. I know I'm introducing someone who is not unfamiliar to many of you but a little introduction to Travis Scott. He's Director of Sales Engineering here at Inductive Automation. He's been with the company since the beginning. He's overseen many successful HMI and SCADA Project launches across many different industries. I would say it's safe to say he's very much an expert. He also established our training department and established the support department over the years since its inception so I think he's the right person here. I would say I probably built him up enough to turn it over to Travis and to take over here. So Travis, over to you.

04:44
Travis: Okay, thank you Don. So as Don was saying, I serve as the Director of Sales Engineering but I have had many hats here at Inductive Automation and have been here since the beginning. So with that, I've had... I've trained thousands of people in the products, I've had a lot of experience with the Ignition software and I've learned a lot of tricks over the years and today, I'd like to show you some of those tricks, especially in regards to templates. That's the focus of this webinar.

05:12
Travis: Templates, what are they? Let's start at the beginning. What are templates and why do we use them in SCADA? The concept is actually pretty simple. In a HMI/SCADA Project, a template is a visual representation of a component that you develop once instead of developing repeatedly. Templates allow you to do all your logic and make all your changes in one place and then use it repeatedly anywhere in your application. They enable you to design identical-looking components that are driven by different data. So for example, if you have multiple motors in your enterprise and you need to use certain components repeatedly in your project to represent those different motors, you can use a template.

05:52
Travis: Although the data driving each of the graphics is different, the graphics themselves are just simple copies of each other. The place where you define the graphics of the template is called the template master. Whenever you make a change to the master, that change is instantly reflected in every individual use of that template. Those individual uses of the template are called template instances. Instances are where the parameters are defined. That allows you to drive it with different data. So parameters are extremely important with templates, because they allow you to... For a template to be changed, as far as the data that's gonna drive it. You can use instances throughout your entire project and the concept is simple in that if you make a change to the master, all the instances get updated automatically.

06:40
Travis: So there are two main reasons to use templates. The first reason is to save development time now and of course later on. There's a lot of repetitions in SCADA projects. Instead of copying and pasting identical looking components repeatedly, you can save time by developing them in one place as a template. Templates turn the repetition into an opportunity to cut down on project development time because you can develop a large number of repeated components once. It also makes your project a lot simpler because you'd have a lot less windows, a lot less templates to have to go in and modify later on.

07:15
Travis: The example of if you have 200 identical tanks and all of a sudden you have 200 windows to show all of those tanks, well of course, that's a lot of windows you have to go back and modify. The idea of designing once and using many times allows you to have a much smaller base that you're operating from. So yes, you do have to spend some time upfront on developing the template but once the template is developed, it will be ready to use whenever you need it.

07:42
Travis: The second reason is that templates help future-proof your application. The reality is that an HMI/SCADA project is never really finished and a lot of you guys probably know that here today. There's always change that is gonna be made, there's always scope creep, there's always new things we wanna add to the system. So chances are that it will be updated as the users' needs change.

08:01
Travis: Eventually, someone else is gonna have to come in and modify the application. If you're using copy and paste, it's inevitably gonna cause problems later on because when you need to make changes to the object, somebody will have to make the change to each of the individual copies. So obviously, copy and paste is a bad idea but with templates, you can change how a template looks or works in one place, instead of having to manually make a change in multiple places throughout the project and templates can be used in other projects because they're already developed. So templates save a lot of time and effort in the long term.

08:38
Travis: Templates are a best practice in their own right but they're especially powerful when you really understand how to use them and that's our goal here today. So I wanna show you several different ways you can use templates and why you'd use those methods so you can get the most out of them. Part of that will be showing you how they're used in our software Ignition, because there are some unique things you can do with templates in Ignition.

09:00
Travis: So today I wanna show you the different types of templates you can make in Ignition. We're gonna look at static templates, which are simple, very simple templates. We're gonna look at variable templates which can be linked to whatever you want. Indirect templates, which you can use for making a specific type of object. Template repeater which is used for repeating a single template any number of times. Template canvas, which lets you use multiple templates. Template composition, which is for templates within templates and then using templates with UDTs, which have the same purpose as indirect templates but achieve it in a different way.

09:37
Travis: So we're gonna look at all these different types of templates in Ignition. They're all the same concept in mind but they have different uses and it's really important to understand why you'd make your template in a certain way, for how you're gonna use it on the screens.

09:52
Travis: So let's first start by talking about the simplest form of templates, which are static templates. A static template is usually just graphics and usually it does not have parameters. There's really no data behind it. They might have a function but it is something that doesn't change. Like linking to the homepage, for example. So as an example, let's say you need to create a simple button to use in your project. This button has one job. No matter where the button is placed, it always links back to the home page. That's its sole function.

10:23
Travis: So by making this a static template, you can configure a button graphic in one place so you don't have to configure it 50 times or however many times and when you make a change to how the button looks or what it does, like going to a different home screen. You won't have to go to each window and change each button. So let's look at a demo of actually creating a static template and we're gonna do this, of course, in Ignition.

10:47
Travis: So I'm gonna open up here the Ignition designer and in the Ignition designer, up in the top left, there is an area in the project browser for templates and we can create one or more templates here and so I've actually organized my templates here in different folders and for the sake of the demo here I have three folders, indirect, static and variable and we're gonna use these as we go throughout the different demonstrations. So in the static area, I'm gonna create a new template here that is going to be a home button that goes back to the home screen there. So I'm gonna call this home button and I'm gonna make this a certain size. Now, the important thing about this template is that there are no parameters. It's gonna look the same as far as what the graphic is and it's gonna have one sole function, which is go back to the home screen.

11:32
Travis: So let's put a couple of components in there. I'm gonna draw a square here and I'm gonna round the rectangles of the square so that we could kind of make this look a little nice and so rather than making it look terrible, I thought today we'd show how to make some things look nice. So I'm gonna take this square, I'm gonna change the fill paint color, I'm actually gonna do a little gradient and the first color of the gradient, I've already chosen these ahead of time so we can save some time here. I've got like a light blue to a darker blue color and I'm gonna make this gradient go from top to bottom rather than left to right. So I'm gonna use my gradient tool in Ignition to go and move it top to bottom.

12:18
Travis: Now, I wanna have a graphic of the home button. So what I've already done is I went to openclipart.org and I downloaded a SVG file that I can simply just drag into my window and that's a nice little home graphic here. So I'm gonna make this smaller, of course and put it right in the middle and I also wanna go inside of it and make all the colors there white.

12:41
Travis: So that it'll look nice on that blue background. Now, this is gonna have... This graphic here is defined as a home graphic. It's gonna have one sole function that is to go to the home screen. So on the component itself on the back rectangle, I may want to make the cursor hand and I want to make it so that what it's gonna do, when I do a mouse press is go to the home screen. So on a mouse press, I'm gonna go open, I'm actually gonna swap back to let's say our main screen is the overview window here and that's all it's gonna do here. So I'm gonna press okay and now my static template is created. I can now use that template on many windows, let's say I go here to my overview screen and or in the roster management screen and the top right, I'm gonna drag that home button up there and put up to the top right and I'm gonna do the same thing for a couple other windows here. So I'm gonna copy that into, let's say the schedule management screen, I'm gonna copy that into my user management screen, a couple different windows here. Let me go ahead and save that.

13:38
Travis: Now, the important thing about templates is that I could find it in one place. So if I go back to my home button, now that I've used that temple on three different windows, if I go back to that button and I make a simple change, let's say I'm gonna make this top part of the house, I'm gonna make that a red color so you can see now that's red. If I go back to the other windows, you'll see that they all have updated automatically for me with that new color. Okay so it's very simple to use and modify templates.

14:04
Travis: So let's take a look at the runtime to see what... Look at it in action. So remember, it's gonna go back to the home screen so if I click on it from this window here on user management goes back to the home, if I go to schedule management, click on it, it goes back to home, roster management goes back to home. So the idea here is, if I wanna make a change as to what window it goes to or how that graphic looks, I go and do that in one place. The static templates are very important and they can take various forms.

14:31
Travis: This one actually has a look and a function, they can simply just have a look. Maybe you have pipes you wanna bring into your applications and you want to use that as a template, maybe you have a more complicated graphic, like this process mixer that I wanna use several times but if I wanna tweak it and modify it, I do it in one place. So static templates, they have a purpose and they're typically not parameterized because they don't change. They have a look and a function and you can use that throughout your application.

14:56
Travis: So by definition, static templates don't change. If we want to be able to change its function or what it's linked to, we need to use a parameterized template. A parameter is what allows each instance to reference different data. Parameters allow instances that otherwise look identical to contain different data and that brings us to the next kind of template, which are variable templates.

15:19
Travis: Variable templates are the next step up from static templates. A simple variable template is like making your own component for Ignition. It's just a graphic that exposes a simple property that can be linked to other tags or any other data source, like maybe a query or a calculation through an expression, whatever it may be.

15:37
Travis: A variable template commonly has one parameter, which is a simple value like integer or a string. As I said earlier, the parameter is what allows template instances to reference different data. This is the template you need when you don't know how it's gonna be used on the screen but you do wanna make this combination of components in one place. What you're essentially making is a component that anyone can use in any way that they want.

16:02
Travis: The variable template is a very generic template that you or somebody else can link to anything they want, whether it's a tag, a query or whatever. So for example, let's say you wanna make a customized tank graphic that displays a level and you don't like the tank that comes with Ignition. Let's say that the tank's level is integer so you want to make a template with a simple integer value parameter. You can link the value of the template instantly to any source that's out there, a tag, a query, a calculation or anything else. Whatever it's linked to on the window will determine what that level is but the appearance of the tank is determined by the template graphic.

16:42
Travis: So let's take a look at how we can make a variable template Ignition, let's do a demo of that tank. An example, let's say we have a tank that we wanna use that is not the one that comes with Ignition so if you go to Ignition's component palette over here on the right hand side, there's a cylindrical tank and you may not like that, maybe your tank is a powder tank and it looks different and wanna use that instead of the cylindrical tank. Well, the great thing about the cylindrical tank, it's a component of Ignition. So no matter what window you put it on, if we at Inductive Automation make a change to that tank, then everybody's gonna get that update and so that's the same concept of the template but here we can actually make a template that is our own component. So I'm gonna go here to my variable area, I'm gonna right click and create a new template and I'm gonna call this powder tank.

17:28
Travis: Now, the important thing about this one is it's going to be parameterized. So the first step that we do with this template is to right click and go to customizers custom properties to add a template parameter. In this case, we're gonna do a simple parameter and we're gonna call this level and it's gonna be integer value. So literally it's gonna be the level that we wanna show in that tank and we're gonna make that a drop target, we'll show you what that does in just a few minutes. So what I wanna do here is actually make this look like that tank and I'm gonna use these simple factory graphics since we have some tanks in here that I can play around with.

18:00
Travis: Let's say our powder tank looks like this one right here so I'm gonna put that one onto the window and make it a little bigger and so of course, I wanna see a level in there so what I can also do is go to a cut away and I'm gonna actually take a shape like this one here and cut it away from that powder tank. So I'm gonna go ahead and select the tank, select that cut away and I'm going to go in and do a difference so I can cut out a shape of that template or that graphic and then I'm going to go over here to my level indicator and put that on the window so the level indicator is gonna be what shows that level. I'm gonna put that behind that cut away there so I can see it. So if I go and set my value here to 50, you'll see that it fills up.

18:41
Travis: Now, of course, the level indicator right now is above the powder tank so I'm gonna put it behind it. So I'm gonna use this way of moving it to the back so now you can see it's behind it and I've made my own graphic. The last thing I wanna do, of course, is link the level of this indicator to the property of parameter of the template. So I'm gonna go ahead and bind the value to a property, go and get the level of the template there that I just created and now it's ready to go. So now I can go use a window and we may not know how the user is gonna use this on the window, if they're gonna link it to a tag or to something else. So the idea is that I can take the template, put it on here like a component and I can go down here to the property and I set it to whatever I want.

19:18
Travis: So if I set it to 60, you can see that one is certainly looking at 60. If I put another one on here, I can set it to a value of 20, it's showing different values but of course, we can link these to different things so let's say the first one, I wanna link that to a tag so I take a tag that we have over here and we can link it over and I'm gonna take one of these ramps, I'm just gonna drag it over to the template and you'll see it's gonna link it up to that one, now the value is changing. Now, the great thing about using that drop target is I can take a tag and drag it on the screen and if I go to my templates, I can see any of the variable templates that I've created and I can simply just use it.

19:52
Travis: So if I select the powder take now, it will automatically put it on the window and link it to that tag. I have a couple of other ones here, I can take the ramp tag and bring it on here as a gauge, for example, that's gonna now show that. It's another variable template that we've created in here or there's another example of the temperature gauge. 'cause the idea is all very simple. I expose a parameter that I can link to, on a screen, to anything I want, whether it will be a tag, a query or whatever.

20:17
Travis: Okay so we just talked about the variable method, which is bindable to anything because you have the flexibility in what it can be used for. Now let's talk about the template that you want to use when you do know what you're gonna use it for. So when you have a specific thing that you're trying to make like an object, a motor, a valve, a compressor, that you wanna use indirect linking on. What indirect binding does is create templates that point indirectly to a set of tags based on a simple parameter like an integer or a string.

20:45
Travis: Indirect linking makes it possible to have one template for all of your motors. So let's for example, let's say you have a template for all of your motors in your enterprise. You've got 200 motors right now and you need to add motor 201. In Ignition, you have to add four tags to make this happen. You have the HOA tag, the amps tag, the run command tag and the status tag in order for you to display that motor on the screen. If you put your data in a consistent hierarchy with the same four tags in each folder, then you don't have to go in and bring those tags on the screen every time, you can simply use a template for all your motors and you can use a parameter to point to a set of those tags.

21:25
Travis: So instead of creating 200 screens or 200 identical motors, you can save a lot of time by having one template for all of them. Making a template that knows it is always gonna be used for a motor.

21:39
Travis: So as I said, indirect template knows where you're going to use it for. That's because within the template, you're indicating that the data is looking at a location somewhere in a particular data structure and that structure is determined by the template's parameter. You can only use indirection when your data is structured in a consistent way. You have to build the data structure in such a way that when you add a new motor, your template will point to the tags in the new motor thus giving you the ability to change a template by substituting part of the path with the variable. This only works if every motor has the exact same set of tags as well.

22:09
Travis: So rather than talking about that, let's show an example of how this will work. It's much easier to see why we create indirect templates in the designer versus just talking about it. So if you look over here, I've got a motors folder and I've got four motors. Every motor is identical in that they have the same four tags. Amps, HOA, run command and status. Well, the only difference between each of these tags is of course, which motor it's gonna point to in the PLC. So I've created all the tags in Ignition but I've organized them to a very nice hierarchy, where the only difference between the parts are this motor name, M1, M2, M3 and M4. So within each folder, I've made sure that I've named all the tags exactly the same. So I can then create a template that knows about this structure where I can indirectly point to one of the different folders by the parameter.

22:57
Travis: Let's go over here to our templates, let's create a new one in the indirect area, I'm gonna call this motor and again, the first thing we're doing is gonna have a parameter because again, it's parameterized. So I'm gonna go into the custom properties, I'm gonna add one called motor name and I'm gonna make this a simple type, a string so that I can put M1 or M2 and I can point it to one of these folders. So now let's actually put a little motor graphic in place. I'm gonna go up here, I'm gonna find a motor. Say I like that motor there and I wanna put just a simple LED on the window as well. So we'll keep it a very simple template and I wanna actually color that motor based on the HOA so I'm gonna bind the fill paint now to the indirect tag.

23:40
Travis: In the indirect tag, I'm gonna go find a tag by default so motor M1, HOA and the part I'm gonna change or substitute is this M1. Remove that part and link it to the motor name of the template. So that's gonna drive, which of those folders I'm going to be looking at. Then of course, I can put my number to color translation. So if it's zero, I'm gonna do red and if it's one, I'm gonna do green, let's say and so on and so forth there. So I'll do one more, I'll do a yellow for two.

24:16
Travis: Okay and so that one's now done and then of course, on my LED, I'm gonna bind it to indirect tag and I'm gonna use the amps. So I'm gonna go down to my motors, grab one of the motors, get the amps tag there and I'm gonna again replace the M1 with the motor name parameter of the template. So I'm gonna go to press okay and now the template is ready to go. So if I go to a window, I can use that template on the window.

24:38
Travis: So I can simply just take the drag motor on and right now, it's not gonna point to anything because the motor name here is empty and I need to put that name to match one of the folders I have over here because it very much knows about that structure. So if I put M1, I can see now pointing to M1. Now I can have multiple of these on the window. I could put M2 and so on and so forth, I could put M3, it's gonna point to the different ones that we have over here and again, the great thing is, if I wanna make a change, add something new, like if I wanna go here and add to the left-hand side of the LED, a little label that says amps so I know what it is, I go back to my screen and you can see all of them have updated it for me automatically and so making templates indirect like that allows us to point to really anything we have in our tag database and you can make things very generic in that way.

25:28
Travis: So Indirection is also used in two features, in Ignition called a template repeater and a template Canvas and we are gonna talk about the repeater one here first. The template repeater lets you automatically repeat a single template any number of times. You drop a template repeater on the window, it looks like an empty container and you select the template that you want to repeat and it fills up the empty container with repetitions of that template.

25:53
Travis: The benefit of being able to auto-repeat a template as many times as you want is that it makes it easy to quickly create screens to represent many similar pieces of equipment. It also lets you create dynamic screens that automatically configure themselves based on configuration stored in a database or tag structure. That makes the... Both the components and the window structures dynamically variable, the configuration, the components can come from a database and that makes for very nice projects that can be driven by a user in the runtime.

26:23
Travis: Now the Template Canvas is like the Template Repeater, it's a component that can allow you to dynamically create any template at the runtime, it allows you to use many different kinds of templates as you want, any number of times on that Canvas. Number of templates that appear on the screen can change, the number is determined by the database or whatever you link that Template Canvas to and this component is an added functionality to the Vision Module Ignition Version 7.7. Let's take a look at both of these components in action here in Ignition, the Template Repeater and the Template Canvas and see why we would use them.

27:01
Travis: So I already have... Let's look at the Template Repeater one first and if I go over here to the right-hand side and scroll down to component palate, I'll see under the containers, I'll have the Template Repeater, I can simply just put it on the window and make it as big or small as I want and this one as you can see, it's an empty Canvas, there's nothing in there. Now what I've done already is I've created an indirect template here, we did the motor in the previous one but I'll create another one called tank and so all the tank one does is basically have a tank graphic and I happen to have 25 different tanks, okay? And so each one has simply an index as to which tank I'm gonna point to as that parameter. I'm gonna take advantage of this fact, by going through Repeater and I said I wanna repeat the template here, which is variable, sorry, indirect and tank, I wanna repeat that many number of times.

27:50
Travis: Now when I repeat it, I wanna flow it... The layout style is gonna be a flow and I'm gonna go from vertical and left to top and I'll put a little gap between all these, a five and five-pixel gap and now I go up here to my repeat count and I say simply repeat it 25 times and so if I do that, now you can see that on the screen 25 templates automatically got generated for me dynamically and I have a scroll bar here 'cause I have more than I can see on the screen and so I got tank 100 all the way down to tank 124 and so of course, we can link this count to something in the database or maybe to a tag so I happen to have a tag over here called tank count, I can simply drag that down to the repeat count and now you can see there's 10 'cause the value is 10.

28:33
Travis: If I go and change that put five, I'll see there's only five here, if I go back to 25, I can see now there's 25 and of course, all of these things are pointing to tags over here that I've created already. All these tank tags with all the information I need to display that on the screen.

28:48
Travis: The Repeater can save you a lot of time and it can allow you to drive the configuration of what's shown by database query so that in the runtime, you can create the tag dynamically, you can add a row in the database that then will automatically show on the overview screen.

29:03
Travis: Now the Template Canvas component is like the Repeater except for you can actually use multiple templates and this is also driven... Can be driven by a database, allowing you to put whatever the heck you want on the screen, could be any number of templates anywhere you want and so it's driven by a data set over here. So there's a template data set, which basically contains a row for every template you wanna show somewhere in that template by specifying the X, Y, width, height, Z-order all of that. So I can bind this to an SQL query or to a tag we have in the system, whatever I want.

29:35
Travis: In my case, I'm gonna do an SQL query, I'm simply gonna say select star from Canvas config and that's a table that I've created earlier here, which simply has the configuration I wanna show and I'm gonna bring it back just here on screen, just once it's gonna go in my DB database, I'm gonna go and press Okay and now you can see that it's got these different templates on the screen and that was what's configured there and of course, you can see that this is now smoke and mirrors, it's one Canvas component and I just simply have things that are showing inside of it.

30:05
Travis: Now, if you look at the database, here, I'm using MySQL, this is the table that drives that configuration, if I want to add something new, let's say I wanna add another LED, the LED five. I'm gonna do the LED template, I'm gonna just kinda put the information I need, I want to be shown at 210 and let's say I wanna go 420 and 90 and I wanna be width is 90, height 25 and I want it to point to a particular tag. So I wanna say, "Hey, the tag path to this one is gonna be random integer, I don't know, let's say two." And so by adding something new in the database and if I press apply to insert a new row that I have, I can go back to the designer and I can just go refresh that query there and now you can see there's an extra LED here right, right here below these four so it was dynamically created and if I had a screen, some screen in the application, it was like a wizzy wig way of putting new things on the Template Canvas, the user can actually drive what they see like the widget dashboard or a PIN ID diagram or whatever you wanna make completely 100% Dynamic.

31:11
Travis: Templates are so useful that you can put templates inside of other templates. It's a technique called Template Composition. Let's say you have a valve, a pump and a tank, that you all wanna use together in the same way for a particular process. You have other valves and pumps in the enterprise but they all look identical. You can embed a valve or pump object inside a larger group of objects, which means you're embedding a template inside of a larger template.

31:33
Travis: So I'm gonna show you a demo of this one. It's actually a pretty simple concept but there's one thing you have to be careful about when you do this kind of template. So if I go down here and create a new template here, I'm gonna call this my larger template. I can of course put other templates inside of it and so let's say I go here to my static and I put this process mixer in here and I go and put... In my indirect, I wanna put a motor and I wanna put maybe a tank in here and so on. I can actually embed many templates inside of another template.

32:06
Travis: Now what's really important here is that if your templates that you're putting inside of the larger one are parameterized, you have to make sure that you add that parameter to the overall, the larger template because you need to be able to pass information into those inside templates. So typically, you would add one or more parameters here that you can use for all the parameters within that template, thus allowing it to link to the appropriate place. So when you do have that all configured, then when you have that larger template, you can go to a screen and you can simply just drag it onto the screen and there you go. You've got the one that shows the right information and you can use that many times but the great thing is if you make a change to any of the templates inside of it, it obviously funnels through to the larger template there.

32:56
Travis: Now, there's one more method that I want to go over today. It's called linking a template to a user-defined type for UDT. UDTs are also known as complex tags. The goal of the UDTs is identical to the indirect method used with folders and tags but the only difference is that rather than exposing a simple screen, you're exposing the template to the actual UDT itself. That means you can only link the template to tags that are of that same exact type.

33:22
Travis: As in the case with Indirection, structure is important with UDTs. Whenever you use a folder or UDT, it looks like the same structure but UDT is a tag instead of a folder. The UDT makes everything inside of it automatically conform to that structure so that you won't make a mistake like changing a tag name or breaking the application. A UDT is safer than a folder, it'll never let you change the name of its shoulder, it forces that structure. So if you remember that motor that I did earlier, I had four motors and all the same tags, those were folders. It's possible for me to have a tag in one folder named differently than a tag in another folder and that would break that indirect motor template that I created earlier. So same as all of these, you can design in one place and create as many motor tags as you want and that UDT guarantees that you can create that, that has the exact structure that you want so there's no way for those tag names to be different.

34:15
Travis: The reason that we added UDTs to Ignition was so users could have a drag and drop method of creating templates that point indirectly to a set of tags. That was one of the reasons we created UDTs in Ignition. The UDT method is meant for rapid deployment. It's not meant for users who want to have dynamic screens so that's really important. If you're looking for dynamic screens, you're gonna use the indirect templates. With that here we're gonna make UDTs to save development time as far as users who are not gonna make dynamic screens.

34:43
Travis: So let's go for example. Let's say your company doesn't have dynamic screens but you want to have a simple way of dragging and dropping a UDT on a window and you wanna make it easy for the next person who's gonna come in and keep working with that same data structure. You can go into Ignition and use a UDT on template so you could just take a motor and tag, drag it onto a screen because it's the same UDT, boom it makes it, that's the beauty of UDTs.

35:08
Travis: So again, let's show an example of this so you can see it in action. So I'm gonna go to my designer, the last one I'm going to create over here is again, a UDT so I'm gonna create a new template. I'm gonna call this motor with UDT and again, I'm gonna add a parameter to it, right click on my custom properties, I'm gonna add a parameter. In this case though, the parameter type is not gonna be simple, it's gonna be complex, my user defined, I'm gonna my motor that I created here and so now that I've got that, I'm gonna make a drop target. I can of course go and create the exact same thing I did earlier.

35:41
Travis: So I'm gonna go actually steal the stuff I had on the previous motors, gonna copy and paste all that in here and we're gonna go and just change the links. So this top one here, I'm gonna link it to a property instead of an indirect tag and the property is gonna be inside that UDT property to be my HOA, I'm gonna do the same number to color translation here. So the red and green and yellow for all three of those.

36:08
Travis: Then I'm gonna go to my amps, I'm gonna link the value of that again to a property, go inside my UDT and get the amps tag so now it knows that structure because it's there. So if I look at the property on the template, it's a motor type and if I look at the... Inspect that you can see it has the exact same structure every time, guaranteed. Now, once I've created that, which I hope here I'm done, right from my overview window, now I can take any motor tag and drag it on to that window. So let's go and create some motor tags, since these ones here that I created earlier, these were four... These are just folders, they're not actually the UDT tags. I'm gonna go actually in the same folder, go add new tags, data type instances of motors so I'm gonna select motor, I'm gonna create motor one dash four. I'm gonna create four of them here. The motor number is gonna be one to four and the device name here for mine is gonna be control logic so I can have all four of my motors. You can see now the values are coming through.

37:00
Travis: Same identical ideas you have up here, except for these are... This one single tag that is a motor type. Now I can simply drag that tag on the screen and because there's only one UDT with that type, you can see it automatically creates it and it's gonna link it directly to it for me keeping it very simple and easy for development later on.

37:24
Travis: So to summarize the main points that I've shown you today, you can use static templates to define a graphic in one place that typically just has one sole purpose and it's just simply a graphic. You can set up variable templates when you don't know how the templates are gonna be used on the screen so you can link into anything you want. Indirect templates are useful when you're trying to make a specific thing like a motor or a valve and which requires a consistent data structure that you may want to use, especially for dynamic screens. Indirection can also be used in the template repeater and the template canvas, you can be able to dynamically instantiate them at the run time.

38:03
Travis: Templates can also be placed inside of other templates and as you saw with the last thing here, when you use UDTs with templates and you don't have dynamic screens, you can drag and drop those UDTs on the screen and you can create those templates very rapidly and so one last thing here, if you found today's webinar helpful, we'd like to show you more ways that Ignition powerful templates can speed up the development of your next project. So today, I'll be sending you a personalized invitation for a live Ignition demonstration where we can answer more of your questions and talk about templates in rapid deployment or development in Ignition. So thank you very much I'ma hand it back over here to Don.

38:44
Don: Great Travis, that was great. Just as you guys are getting in your final questions, we got a question tab there. There's some questions in the queue so please go ahead and add to them and any questions you have, we try to leave about 15 minutes for a Q & A and we've got about 15 minutes. So I just wanna mention a couple of things. Certainly invite you to go ahead and try Ignition today. You can see it on the screen, just download it. A full version of Ignition for free and I will say just as a comment and that if you're downloading it using it to our run, trying that simple factor, you only get the first graphic I think for free. Isn't that true Travis? In the beginning of when...

39:20
Don: So you'll only be using the first graphic for your trial one, if you're doing it that way. Just go ahead and go to inductionautomation.com and download it. It's only gonna take about three minutes, you can install it and put it on your own system and build whatever you wanna build before you ever purchase it. So that's one thing also and then, I really do wanna mention Inductive University, if you wanna learn more about Ignition, development tips, learn about templates, you can click over to Inductive Automation. Excuse me, inductiveuniversity.com. It's a free online training service. You can do this at your own time anywhere in the world. We have courses there, there's 550 plus videos across all HMI/SCADA, expanding more and more MES videos and courses so you can learn any aspect of Ignition you want.

40:07
Don: You can also search it for just going individually rather than go into the actual course curriculum but you can end up getting yourself fully credentialed in Ignition, which can lead you forward to become certified and get trained here at our offices here. It's there for your use. There's been hundreds of thousands of videos taken advantage of since we launched it in our September Ignition Community Conference so please go there and take advantage of the fact that our goal was to basically do knowledge transfer like this design like a Pro Series but also put you in charge of it so you could just pace yourself and go through your own things as you go along.

40:42
Don: As we go into the Q&A here, please take advantage of Travis' offer. If you want a personalized demo, our representatives are all listed here. You can contact overall, if you don't have someone to contact, you can call Melanie Monis and she'll put you in touch with someone but really the extensions are here, take advantage of a tremendous amount of opportunity to learn from that kind of individualized demo. So with that, we're gonna go into a Q&A and I'll just read questions off, Travis and you can just grab them as we do, okay. First one is, how does this template communicate with multi-physical control systems like Bradley Delta B?

41:22
Travis: So it's a good question. Essentially in Ignition, you can connect to multiple devices, multiple different OPC servers and ultimately in one tag database, you can have tags from different systems out there. Different PLCs, different OPC servers, whatever it may be. The idea is that you're creating that tag structure in Ignition so if you remember the indirect ones that I created, I can create folders and I can have tags named the right way inside of it. The tags, I don't care where it's pointing to behind the scenes, you can make the template that looks at that known structure that we created ourselves and behind the scenes gonna point to various PLCs and devices that happen to be out there. So it's all gonna be through that tag database is really how these things can come to life.

42:02
Don: Well, we'll go to another question. I wanna answer Dale Whitman's question from earlier. He made a comment, he said, "Don, you probably have the easiest job in the world 'cause Ignition sells itself." So I wanna answer your question. Yes Dale, I do have the easiest job in the world 'cause Ignition sells itself but thanks for your comment, I appreciate it Dale. The next one is, how do I move items inside a template, like a pan?

42:26
Travis: So you have to actually go and open the template up. If you're talking about Ignition, when you drag a template on the window, of course, you're gonna use it. So you can actually double click on it and go back to the template itself and then you can move things around inside that template as you would on a normal screen there. So it's very simple once you go edit that actual template that you have there.

42:47
Don: Great. Are there any plans to support UDTs in the external DB tag provider?

42:53
Travis: So unfortunately with that, we don't have any plans for supporting UDTs in the external tag provider. We have other plans, they're gonna make that a new point for our next version so that will be coming out. Look for our next version and in our conference, we're gonna talk a lot more about that.

43:08
Don: So stay tuned David. How does this template... We already answered that one so here's the next one. Are these informations provided also in the user documentation?

43:21
Travis: So the user documentation doesn't have as far... It talks about templates very generically, template tab parameters, they have this. They don't talk about the use cases for why you would use templates in different ways. So that was the purpose of the webinar here today and there's also some videos on these templates, these ideas in the Inductive University. So I would encourage you to go there and look at that.

43:43
Don: Cool, that sounds great. Is there a way to speed up how fast you can scroll on a template repeater?

43:51
Travis: I'm sure there probably is a way in scripting to do that out of the box. That scroll bar there, you're looking at probably your mouse build to scroll up and down, that's very much dependent on Java there but I'm sure we could probably change that in scripting it's something I'd have to look into there.

44:08
Don: Okay, cool so here's a question on the template hierarchy. If you change the template hierarchy, in the template section in the project browser, it changes the path through all template instances, meaning unless I'm doing something incorrectly, if I change the file hierarchy after the fact, do I now need to go into each template instance to re-change the template path where the template instance is placed?

44:33
Travis: And so unfortunately, the answer to that question is yes. You do have to go and modify that. We have chosen Ignition to use string paths for pretty much everything, for pointing to Windows, pointing to tags, pointing to templates and pointing to other things there. So because we chose string paths, you can do some really cool things. There's techniques to point to anything you want and dynamically generate that path and it allows it to be a very flexible system. The only downfall of that... Choosing that is that if you make a change to your folders, your tags or to your template hierarchy or to your window hierarchy, because you renamed it or moved it around, it changed that path and that is gonna break where it's used on screens. With that though, you can do a search replace. So I would go in the designer find and do a search for the old path, change it with the new path and you should be good to go with that will help you with that. So the idea is to hopefully get that structure more or less right the first time but sometimes it could be difficult, that's why search replacements do exist.

45:33
Don: I think you mentioned this but what version did the template canvas appear. You mentioned it in passing.

45:37
Travis: Yeah so that was in Ignition 7.7 where that template canvas actually came out. I believe, actually 7.7.2, to be honest. So if you get the latest version 7.7.4, you're not gonna have any problems. You'll be able to see that canvas. It's a fantastic component. There's so many uses of it. I showed you just a brief thing today but it is the first way in Ignition to dynamically create anything you want in the runtime, anything on that screen. So it could be driven by a database configuration, by scripting, by whatever means you want.

46:11
Don: Since I'm located at a wastewater tree plant, do you have a customer co-op whereby similar used HMI screens are shared between customers.

46:21
Travis: Oh, man, that is a fantastic question.

46:24
Don: That's a good question, isn't it?

46:25
Travis: It's such a good question, I'm gonna go back to the designer here for a second. So in Ignition, all these templates that I'm making and the reason I think templates are... Templates are so important and powerful, I can't stress that enough. You want you to make these templates. Now, I'm so passionate about this designing objects and designing in one place and using it many times, especially with templates that I actually programmed in Ignition here, I was responsible for a new feature called Cloud templates and cloud templates allows anybody to go and submit their template onto a cloud repository, an online repository hosted by Inductive Automation for private or public use. So any template you make, you can right click, you can send it to cloud templates. You would log in with your Inductive Automation email address and your Inductive Automation login email and password.

47:20
Travis: Let me go ahead and do that on my side. I can type my password and I can actually upload it for public or private use here and so if I go public, anybody can then download that template and use it, if I put it for private use only myself, only I can go on there and log in and use it. So I can submit that if I go up here to tools in the designer and go to cloud templates browser. There are quite a few templates in here right now, there's 53 of them. We are hoping that this will take hold and more people will add to the cloud templates area but for example, you want one of those gauges I showed you, we've put these gauges on cloud templates. There's some others that other people have made. Most recently, I saw a QR code component up there, which was made, you can just import that template into your application and you'll see it here and there you can go and modify it, make changes to it, you can then drag it on screens. Very nice system to work with and if you log in, sign in here, you'll see all of your private templates that you have.

48:17
Don: That's a great question, Mike and actually you're going in the correct direction, this is why Travis created it. We'd like more and more template sharing to occur. Next question, we got a couple more minutes for questions here. So we still got quite a few. Can you import UDTs from control logics?

48:33
Travis: Absolutely. I'm gonna go back to the designer here. In the data types you have or our tag browser, if you go and browse the PLC and you have your control logic device, like I have here, inside of that, of course, you have instances of those UDTs so say, for example, if my motor at the M1, I can drag that folder over to data types, create that type. It's gonna copy that entire hierarchy in there and then you can go and parameterize it and go and finish out that UDT. So it'll make it very fast in creating those different UDTs in Ignition.

49:06
Don: What clip-art website did you use for graphics?

49:09
Travis: So I like openclipart.org. There's that one and there's also a website, I have to get the actual URL if you gonna search for it but there's Icon SVG set and there's a whole bunch of icons, like the home Icon and other things that are actual SVGs, you can just simply drag on to window. The great thing about SVGs is they are scalable. You can use them and scale up, they're nice. They're better than PNGs, JPEGs or GIFs. So there are quite a few websites out there that do have these SVGs.

49:38
Don: Travis, this isn't a tangential question but maybe you wanna answer it anyway, the answer to my question may be already covered in a different webinar, 'cause it's about alarms and alarm notification. Is it capable of emailing alarms and data logs?

49:52
Travis: Yeah. Absolutely. So the alarming system has the ability, email, text message and do voice calls.

49:57
Don: Okay so there you go, Mike, there's the answer to your question. For search and replace for tag paths, does this replace where the path is used in all windows at once or do you have to do that for each individual window?

50:11
Travis: No. So you can do it all in one time so when you actually are going to use the find and replace since we talked about that earlier, when you do the find and replace in here, you will see windows and templates. By default it shows you only the open ones but you can go in there and click all on those and you can search for all of them and do the find and replace everything that you have.

50:31
Don: Can I read from external databases?

50:34
Travis: Absolutely. Any SQL database that's out there, whether it be MySQL, Microsoft SQL Server, Oracle, Postgres, DB2, whatever database you have, you can certainly read from that. You can use that at template repeater or template canvas, you can also read data to tags. Where we natively work with databases so you can use it in any way that you'd like to use it.

50:53
Don: Okay, next question here. We got time for a couple of more. So if you're trying to fit one in go ahead and do it, now. I've created an SVG file using the Edraw software but I have a problem putting it inside a template.

51:06
Travis: Okay so if you've created an SVG in another application like Edraw or Inkscape or Illustrator or something like that. The first thing I would do is drag it into a window and make sure that you can see it come through the window. If you don't see it, I've seen it a lot of times in the SVG itself, it doesn't specify the width and height. So it comes in and it's one by one pixel so you can't see anything. If you were to right click and change the size and position of that, you can make it bigger and hopefully it will show up. So try that first and then you can copy it from there like cut it into the template and use it there. If none of these things work, just give us a call. We could take a look at it.

51:43
Don: Cool. I think we're coming to the end of our time here. Maybe time for one more question, if not that's... Like I said, I'm wrapping up. Just scrolling through here looking at it, I think we covered the questions you guys had today, which is great. So I really hope that this was a valuable time for you as part of our Design Like a Pro Series. Take advantage of Travis' offer. If you wanna go deeper, contact anyone on the screen here and we'll be happy to do a demo. Download, go to the university. I think our overall goal in doing Design Like a Pro and just the webinars we do overall is to just try and share something. You can tell from Travis that we are pretty darn passionate about here, which is the capabilities that we're giving you with Ignition.

Posted on April 13, 2015