Skip to main content

Equipment templates

A template describes the tags of one kind of equipment once, such as a pump with its speed, current and running state. Groups created from it stay bound to it: change the template, and every bound group (Pump1, Pump2, Pump3…) changes with it. Each bound group has its own device and base address.

Templates are in the Templates section of the sidebar on the Tag Management page, under the tag tree. Drag the handle at its top edge to make it taller, up to half the sidebar (double-click resets it).

Making a template​

From a group you already have (quickest)​

  1. On Tag Management, select a group that is set up the way you want, for example Plant/Line1/Pump1.
  2. Choose Save as template, give it a name (for example Pump), and save.

Every tag in the group, including sub-groups, becomes part of the template, with its data type, units, access, scaling, deadband and logging. Addresses are turned into offsets from the lowest address number in the group: if Pump1 uses HR:20, HR:21 and HR:25.3, the template gets HR:{+0}, HR:{+1} and HR:{+5}.3.

The group is then bound to the new template (base address 20 in this example). If its tags come from more than one device, the template is saved but the group is not bound.

From scratch​

Press + in the Templates section of the sidebar, enter a name, and list its tags:

ColumnMeaning
NamePath under the equipment's group. Use / for sub-groups, e.g. Motor/Current
Data type, Units, Display, AccessAs for any tag
AddressOffsets from the base address, see below. Empty for a memory tag
Poll groupGroup's poll group (preselected) uses the Group poll group chosen for each bound group when you create it or under Change binding; or pick a poll group for this tag only

The tags are listed in a table. Select one to edit all of its settings in the panel on the right (General, Source, Scaling, Deadband), the same layout as a tag's own properties; close the panel with × or Esc. Add tag adds a row and opens it in the panel.

Rename, duplicate, copy and paste​

Rename template (right-click, or select it and press F2) changes its name; groups bound to it stay bound and follow the new name.

Right-click menu of a template

Right-click a template in the Templates section of the sidebar:

  • Duplicate template (Ctrl+D) makes a copy named with the next free suffix: Pump becomes Pump_1, then Pump_2.
  • Copy template (Ctrl+C), then right-click in the Templates list and choose Paste template (Ctrl+V). Paste asks for a name, and a name that is already used must be changed before Paste is enabled.

A copy has the same tags and settings but no bound groups; groups bound to the original stay bound to it. Use a copy as the starting point for a similar piece of equipment.

Addresses in templates​

{+n} means "the base address plus n". Each bound group has its own base address.

Template addressBase 100 gives
HR:{+0}HR:100
HR:{+2}HR:102
HR:{+5}.3HR:105.3 (bit 3)
CO:{+1}CO:101
HR:7 (no braces)HR:7 (always the same)

Choose Addresses for at the top of the tag list (Modbus, Siemens S7 absolute, Siemens S7 symbolic, OPC UA, OPC DA or MQTT). It sets the help text, the (i) address help and the address a new tag gets. It is saved with the template (and in the Excel workbook's Addresses for column); templates saved before it was kept are guessed from their addresses, so pick the right one and save once.

For Siemens S7 absolute, {base} is the data block and {+n} the byte offset, both set per group: with data block DB5 and base address 100, {base}.DBD{+0} reads DB5.DBD100 and {base}.DBX{+6}.1 bit 1 of byte 106. So DB5, DB6 and DB7 with the same layout share one template: each group sets its Data block and Base address. Save as template on a group whose tags are all in one data block does this for you (the block becomes {base}).

On a Siemens PLC with symbolic access, an address can start with {base} instead: the group's Structure (for example "DataDB".Motor1) is put in its place, so {base}.Speed reads "DataDB".Motor1.Speed. Fill from PLC (shown with Siemens S7, symbolic) opens the PLC's variable tree: tick a data block or one structure (for example Motor1) and its variables become the template's tags, addressed from {base}, with their types; the template is named after the structure if it has no name yet. Add from PLC on a tag group goes further and makes templates and bound groups at once from the structures you tick (see the Connectors guide).

For OPC UA, {base} is the node id of the object each group stands for, its Object node:

Template addressObject nodeReads
{base}.Speedns=2;s=Line1.Motor1ns=2;s=Line1.Motor1.Speed (string node ids that follow the tree)
{base}/2:Speedns=2;i=5100the child of ns=2;i=5100 whose browse name is Speed in namespace 2

The second form works on any server, because OPC UA objects of the same type have children with the same browse names. Fill from server (shown with OPC UA) opens the server's tree: tick one object (for example Motor1) or variables in it, and they become the template's tags with the right form of address; the template is named after the object's type. Add from server on a tag group makes templates and bound groups at once.

For OPC DA, {base} is the item id of the branch each group stands for, its Branch: with branch Channel1.Motor1, {base}.Speed reads item Channel1.Motor1.Speed, so Motor1, Motor2 and Motor3 with the same items share one template. Fill from server (shown with OPC DA) opens the server's tree: tick one branch or items in it, and they become the template's tags. This needs a server whose item ids follow its tree (KEPServerEX, Matrikon and most others); items whose ids do not start with the branch's are left out.

For MQTT, {base} is the Topic prefix each group stands for, the topic levels in front of each tag's own topic. One template serves every machine that publishes the same topics under its own prefix:

Template addressTopic prefixReads
{base}/temperatureplant/line1topic plant/line1/temperature
{base}/status; json=$.speedplant/line2field speed of the JSON message on plant/line2/status
{base}/pump/state; write={base}/pump/cmdplant/line3plant/line3/pump/state, written by publishing to plant/line3/pump/cmd

Fill from broker (shown with MQTT) listens to the broker like Discover: tick the topics or JSON fields of one machine, and the topic levels they share become {base}. Save as template on a group of MQTT tags does the same with the tags' topics, and numbers in topics (such as line1) are kept, not turned into offsets.

All offsets in a template count from the same base, whatever the area (HR, IR, CO, DI). If a pump's coils and registers do not move together from one pump to the next, use separate templates or fixed addresses.

The (i) button next to a template tag's Address shows the address syntax of your connector type, with the examples already written as offsets. Click one to use it.

Creating a bound group​

Either:

  • select a group and choose New from template (or the wand button in the Tags header), or
  • select the template in the sidebar and choose Create tags from it.

Then pick:

FieldMeaning
TemplateWhich equipment
Group for the new tagse.g. Plant/Line1/Pump3. The next free name is suggested
Connector, DeviceWhere the values come from. Only connectors that understand the template's addresses are listed (Modbus templates for Modbus connectors, S7 templates for Siemens)
Group poll groupUsed by every template tag set to Group's poll group
Data block, Structure, Object node, Branch or Topic prefixWhat {base} becomes, e.g. DB5, "DataDB".Motor1, ns=2;s=Line1.Motor1, Channel1.Motor1 or plant/line1
Base addressThe number {+0} becomes (the byte, for S7)

On a Siemens PLC with symbolic access and on an OPC UA or OPC DA server, Browse… next to Structure, Object node or Branch reads the device and lets you pick a data block, structure, OPC UA object or OPC DA branch instead of typing it (click it, then Use, or double-click; the arrow opens a level). The group is then named after it (Motor2) unless you typed a group yourself, and a line under the field says whether every template address exists under the pick, or how many are missing.

The list below shows exactly which tags will be created and their addresses. Tags that already exist are shown in red, and nothing is created until they are resolved. Create adds all of them in one step; if any address is not valid for the device, nothing is created and the problems are listed.

Bound groups​

  • In the tag tree, a bound group shows the template's name next to it, and tags added to it by hand are marked Extra.
  • Selecting the group shows Bound to template … with its device, poll group and base address, and buttons to Edit template, Change binding (another device, poll group or base address: the tags' addresses follow) and Unbind.
  • The template lists its bound groups at the top.

Changing a template​

Edit it and press Save and update N group(s). In every bound group, new template tags are added, changed ones are updated, and tags removed from the template are deleted. Values keep flowing for tags that did not change.

If a new template tag would land on a tag you made by hand in a bound group (same name), the save is refused and the tag is named, so nothing is overwritten.

Editing tags of a bound group​

Tags of a bound group are edited through the template, so all groups stay the same: their settings are shown but locked, with a note and an Edit template button. Writing values still works.

To change one group on its own, Unbind it. Its tags stay as they are and become ordinary tags; later template changes no longer reach it. You can add your own extra tags to a bound group at any time: they are marked Extra in the tag tree and the group view, and template changes leave them alone.

Deleting​

  • Deleting a bound group's group deletes its tags and its binding.
  • Deleting a template that groups are bound to asks first; those groups are unbound and keep their tags.

Templates and bindings are included in Export and Import.