Node Setup / Using Templates
In this video of our N3uron Academy, we’ll focus on templates inheritance and nesting.
[04:53] Templates Overview
[06:39] Creating Templates
[03:40] Creating Template Instances
[04:48] Nested Templates
[00:00] In our previous video, we covered the creation of template instances. Today our focus shifts to inheritance and nesting. When working with templates, N3uron offers us the ability to add a template instance as a member of another template, that is, we have the ability to nest templates inside of each other. This functionality becomes incredibly handy when dealing with large or complex data structures or when you want to combine multiple templates into one cohesive unit. To illustrate this, I’ll be working with the tracker template we’ve been exploring in earlier lessons. But first, let’s revisit the data provided by the OPC UA Server for my PV plant. To do this, we go to the module instance, expand the menu, and select OPC Browser. From the drop-down menu, let’s select the connection – in this case, we only have one connection named ‘OPC Server’. Let’s expand the ‘Objects’ section, and you’ll see that our plant comprises several cabins, each containing six trackers.
[01:04] Given this repetitive structure, it makes perfect sense to create a ‘Cabin’ template and nest six ‘Tracker’ instances within it. Now let’s come back to the configuration panel. If we select one of the tags in the tracker template, like this one, and examine the tag’s address, you’ll notice that it includes a reference to the cabin it belongs to – in this case, ‘CAB01’. To make this more flexible, let’s add a new custom property to the tracker template, allowing it to work with any cabin and not just ‘Cabin 01’. To do this, I’ll click this button to the right of ‘Custom Properties’ and select ‘New Custom Property’. I’m going to call it ‘Cabin’.Now, let’s update the three tags to use this new custom property. So, I’ll start by selecting ‘POSITION_DIFF’ and in the ‘Node ID’ field, replace ‘CAB01’ with the Custom Property reference. So I’ll add double quotes here, a plus sign, remove ‘CAB01’, add ‘Cabin’ between curly braces, another plus sign, and finally double quotes.
[02:04] Now let’s save these changes and repeat the process for the other two tags. Ok, With that sorted, let’s create our ‘Cabin’ template. So I’m going to find the ‘Templates’ panel, click the button, and select ‘New Group’, then ‘Group’. The first thing that we’ll need is a name for our template. So I’m just going to call it ‘Cabin’. This template needs a custom property because it will utilize our ‘Tracker’ template, and the tracker instances need to know which cabin they belong to. So let’s create a new custom property, and let’s just call it Cabin.
[03:01] And finally, I don’t need to set the value inside the definition; It will be set on each instance of the template. So I’m just going to save the changes. Remember, we want the ‘Cabin’ custom property of the tracker instance to inherit the value from our ‘Cabin’ template. To configure this, I’m going to modify my ‘Tracker’ template and add an expression, starting with an equal sign, and including the custom property of the ‘Cabin’ template I want to pass through, which is ‘Cabin’ as well. Note that when we’re referencing a Custom Property, we need to include it in curly braces. So with that, I’m going to save the changes. Now, let’s add the first member to our ‘Cabin’ template – a ‘Tracker’ instance for ‘Tracker01’. So I’ll go to my cabin template again, click this button here, and select ‘Tracker’ to embed an instance, and name it ‘TRK01’. And finally, I’ll set the ‘TrackerNum’ custom property to ‘TRK01’. Now we can add the remaining tracker instances similarly by right-clicking on ‘TRK01’ and selecting ‘Duplicate’. Now let’s change both the name of the instance and the value of the ‘TrackerNum’ custom property value to TRK02, and we could repeat this same process for all six trackers.
[04:06] For now, let’s leave it at that and save the changes. I’ll conclude by creating an instance of my ‘Cabin’ template. To do this, I’m just going to find the ‘Model’ panel, then click this button at the top, and select ‘New Group’, then select ‘Cabin’. I could just call this ‘Cabin02’ And then let’s specify the ‘Cabin’ custom property value. So let’s click here and let’s just set the value to ‘CAB02’, then save the changes. We can see that our template instance has been created. And we check the real-time display on the left hand side panel, we can see that all of the values are coming through successfully. That’s a wrap for today’s lesson on nested templates! Thanks for tuning in, and I’ll see you in the next video.
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]