Node Setup / Using Templates
In this video of our N3uron Academy, we will focus on creating and configuring templates, which essentially means we’ll be working with template definitions.
[04:53] Templates Overview
[06:39] Creating Templates
[03:40] Creating Template Instances
[04:48] Nested Templates
[00:00] As we discussed in our previous video, templates are custom, complex data types that we can use to represent recurring tag structures in a way that ensures organization and maintainability. In today’s lesson, our focus will be on creating and configuring these structures, which essentially means we’ll be working with template definitions in this video. To start, I’ll select ‘Tags’ in the Explorer Panel, and you’ll find the ‘Templates’ panel up here on the right-hand side. Now, I’ll click this button in the top left, which allows us to choose between ‘New Group,’ ‘New Tag,’ or ‘New Folder’ if we want to create folders to better organize our templates. So, to begin, let’s choose ‘Group’ and give our new template a name. We’ll call it ‘Tracker.’ Now, I’m ready to add some member tags. To do that, I just need to click this button to add folders, tags, or even nested template instances into my structure.
[01:02] In this case, I’ll be working with OPC tags for my tracker since my template is intended to model an actual device. Let’s select ‘New Tag,’ expand the configuration section, and under the ‘Source’ options, I’ll enable the data source. I’ll choose ‘OPC UA Client’ from the ‘Module Type’ drop-down menu. Here, I need to select the name of the OPC UA Client instance I’ve created previously, which is ‘OPC UA Client,’ as we can see here. Finally, I need to enter the name of the connection I configured earlier, which, in this case, is ‘OPC Server.’ Now, I’m going to click this icon here, which allows me to browse the OPC UA Server. Naturally, this option will only be useful if your device supports browsing. Inside this interface, I’ll expand ‘Objects,’ ‘BLK01,’ ‘CAB01,’ and here I find my six trackers. If I expand those trackers, we’ll see that they contain the same three tags, which makes this a perfect time to use templates. In this case, I just want my definition to model a single tracker.
[02:02] Then, ultimately, I can create a template instance for each of my six trackers. So, to model just one tracker, I’ll find ‘Tracker 01’ here, click on ‘POSITION_VAL,’ and click the ‘Select’ button on the right. Now, let’s give the tag a consistent name and save the changes. If I take a look at the ‘Node ID’ property on the tag, we’ll see that the item path is set to ‘TRK01.’ This makes perfect sense, it’s the OPC item we selected in our picker a moment ago. However, our tracker template isn’t supposed to work for just ‘Tracker 01.’ We want it to work for any of the trackers. So, in a way, this OPC item path can’t be the same on every template instance. It’s going to need to change somehow. Thankfully, templates can handle this inherently. All we need to do is configure a template Custom Property, which will be set whenever we make an instance of this template, to control which tracker we’re looking at on the device.
[03:02] To do this, I’ll click this button to the right of ‘Custom Properties’ and select ‘New Custom Property.’ Now, we have several options for the custom property, but let’s keep it simple and name our custom property ‘TrackerNum.’ So, we’ll expect a value like ‘TRK01,’ ‘TRK02,’ ‘TRK03,’ and so on, that we can use to make our tags work. Let’s leave the remaining configuration fields with their default values and save the changes. We have this value field on the right. It might be tempting to put something in the value field, but remember, we’re on the template definition here, and we’re meant to decide which tracker to look at when we create instances. So, it’s fine to leave that field blank here. We’re almost done. We just need to modify our ‘POSITION_VAL’ tag to use our new custom property. So, I’ll select ‘POSITION_VAL’ here and then find the ‘Node ID’ field. Now, on this field, I just want to change this text here, ‘TRK01,’ and replace it with the Custom Property reference. To do this, I’m going to use an expression.
[04:01] First, I’ll add an equal sign at the beginning to indicate it’s an expression. Now, I’m going to build a text expression by concatenating different text strings. So, this part will go between quotes. Up to here, I’ll add a plus sign. And now, I’m going to delete ‘Tracker 01’ and I will add our Custom Property, which will be ‘TrackerName,’ between curly braces. I’ll add another plus sign, open quotes, and close quotes at the end. That’s it. It’s worth noting that any part of the ‘Node ID’ or any other field can be made dynamic. Here on the right, in the ‘Output’ field, I have this text, which is how N3uron is resolving this expression. Let’s save the changes. To complete the setup, we just need to add the other two tags that are found in every tracker.
[05:00] There are two approaches we can take. We can either repeat the process we’ve followed so far, or we can choose an alternative method by clicking here to export the configuration to a CSV file. Let’s do it that way and download the CSV file. Now I’m going to open and edit the file. Firstly, I’ll change the data type of every cell to text. Next, I’m going to copy and paste this row here twice. Then, I’ll update the names of the new tags to ‘POSITION_SP’ and ‘POSITION_DIFF.’ Finally, I’ll adjust their respective expressions as needed.
[06:09] After making these changes, we can save the modifications and close the file. Once we’ve finished with the CSV file, we can return to the Web UI. Here, we’ll click this button again and select ‘Load CSV.’ After selecting the file, we’ll click the ‘Load’ button to import the changes. With this step completed, our TEMPLATE is now fully configured and ready to be deployed across our data model.
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]