Email Us at [email protected]

Download N3uron
Back to videos

Node Setup / Using Templates

Templates Overview

Description

In this video of our N3uron Academy, we will focus on templates and how they can simplify your data organization and management and help you save time managing data.

  • [04:53]  Templates Overview

  • [06:39]  Creating Templates

  • [04:48]  Nested Templates

Transcription

[00:00] Welcome to this video series, where we will dive into templates and how they can make your data organization and management a whole lot easier. In this video, we’ll explore how these custom created tag structures can save you a lot of time in managing your data. So, let’s jump right in! Templates are like blueprints for your data organization. They provide a structured approach that can significantly streamline your workflow when some part of your data model is inherently repetitive. Imagine having multiple motors or sensors with the same data points. Maybe you have 100 sensors and you need the exact same tags for each. With templates, you don’t have to manually configure each one separately, saving you a ton of time. By grouping tags together regardless of their origin, you can create complex structures that represent real-world assets like motors, machines, production lines and even whole factories or power plants.

[01:00] This helps you organize your data in a way that mirrors your physical assets, saving you time and effort. The first thing you do when working with a template is declare a template definition. A definition is effectively the master copy of the template, and it should fully or mostly define how we want our custom structure to look. Once we set up a definition that outlines our structure, we create any number of instances which inherit the structure from the corresponding definition they’re derived from. So if we have a template definition with a specific number of tags, each template instance will have the same number of tags. So just to reiterate, a definition declares a template structure effectively like a design specification, and then an instance is an actual collection of tags following that specification. Now to see templates in action, I’m going to find my tags configuration section here in Web UI, on the left-hand side. We can see two different panels, Model and Templates, and we can see a Tracker (que sólo esté el Tracker para no confundir) definition here.

[02:00] And if I click on  it, I have three tags inside Position Diff, Position SP and Position Val. We call these our template member tags, and every instance of this tracker template will include those three tags. Effectively, this is the structure we’d like to repeat. Now if I go to the Model here, we’ll see that we have six instances of our tracker template, trackers one through six here. If I click through some of these, we’ll see that the structure is the same across different trackers like we’d expect, but if I switch over to the Real-time display,  we can see that the actual values on the member tags are different. That’s actually because we’ve set this template to include a custom property. (modificar el template para que lo único que cambie sea una custom property llamada TrackerNum, el resto las fijamos). I’m using this TrackerNum property in our Position Diff, Position SP and Position Val tag configurations to point to the correct tracker, we’ll explore this more in later videos. Now as configured here, our data model is very organized, we have six clear instances containing tags for our six trackers. But as we’ve mentioned, the other real benefit we’re getting here is how easily we can maintain and update our templates when we need to.

[03:00] Say for example that we wanted to make a configurable alarm setpoint for each tracker. Well, if I weren’t using templates, I would need to add a new tag manually for each of my trackers here, but instead what I can do is go back into the Templates panel, double click on my tracker definition, and that will bring up the structure for the definition. And on here, all I need to do is click the ellipsis button here to add a new tag into my structure. And we’ll keep things simple and make it a memory tag here and change the name to ALARM SETPOINT. If I expand the properties of the tag, I can see the properties down here.And then I’ll set the default value to 70. Any properties I specify in here will be included in our template definition, including alarm, history, write permissions, etc. So if I wanted to, I could set up alarms on every instances Position Val tag, just by configuring it here in this interface (aquí movemos el ratón sobre este tag). Now that my ALARM SETPOINT tag is set up, I’ll click Save at the bottom.

[04:00] And then I’ll find my way back into the Model panel and we can see that our ALARM SETPOINT tag has been added to each of our instances. We didn’t have to configure the tag separately six times over, just doing it once in the definition is all it takes. We’ll be exploring additional template features in later videos, but in general templates are a great way of keeping an organized and maintainable data model when any part of your data model is regularly repeated. But that’s not all, templates can also be used to configure connections within the modules, which, once again, enables us to make modifications easily while maintaining a well-organized structure. This is an example for the Modbus Client module, where I have four instances of this cabin template. In the next video, we’ll explore how to create templates from scratch.

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from - Youtube
Vimeo
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google
Spotify
Consent to display content from - Spotify
Sound Cloud
Consent to display content from - Sound