Aliases
Last updated
Last updated
Aliases are designed to map existing bindings on OPC UA items (for example, defined in HMI/SCADA) to OPC UA items that are defined in the server. This can be useful when upgrading an existing automation system to prevent changing bindings on OPC UA items in an existing HMI/SCADA application. Aliases can also be used to better structure server objects, such as combining tags and expressions into a single virtual structure. Aliases can only be defined for string identifiers.
To start configuring aliases, open Monokot Server Administrator, double-click the OPC UA in the Server Explorer pane, and then click the Aliases tab.
In Monokot Server Administrator, you can import / export aliases from / to a CSV file
The following parameters are available for the alias:
ID: Specifies the unique numeric identifier of the alias.
Namespace Index: Specifies the index for the source namespace to be replaced with the server namespace (ns=2). A value of -1 indicates that any source index should be replaced with ns=2.
Node ID/Pattern: Specifies the OPC UA identifier or template that the source OPC UA identifier should match. The value is case sensitive.
Replacement: Specifies the OPC UA identifier or template to match the resulting (modeled) OPC UA identifier.
Type: Specifies the type of alias. There are two types of aliases provided:
Simple
Based on a regular expression (Regex)
A simple alias matches the source OPC UA ID of the item and replaces it with the target OPC UA ID. For example, consider the following alias:
Now the client's OPC UA attempt to add an OPC UA item with the ID ns=3;s=ModbusTcpChannel.RU 001.Current, will be successful if there is a tag with the address Tags.RTU001.Current in the server. The problem with simple aliases is that they are mapped one-by-one and for a large project (for several thousand tags) this can negatively affect server performance, both in design-time mode and in run-time mode.
Regular expression-based aliases are a more flexible and productive type of alias. It allows you to set mapping based on a template. For example, consider the following alias:
This alias will transform all the source OPC UA items IDs starting with ModbusRtuChannel, where the ModbusRtuChannel string will be replaced with Tags, for example:
Consider an example of another regular expression-based alias:
This alias will transform the IDs of the source OPC UA items as follows:
A detailed description of the language for substitutions in regular expressions is provided here. To test the template, you can use the online service located here. Substitutions in regular expressions are a flexible tool for automatic conversion of source identifiers; they allow you to make all sorts of substitutions and permutations. The pattern of the source string can be very complex, both for human understanding and computationally. To limit the maximum execution time of a regular expression, the Alias Max Execution Time parameter is provided (by default, 1 second).
By default, aliases are used only if the requested OPC UA item cannot be found, this behavior is the most productive, but it can be changed by setting Alias Usage Mode.
Namespace Index
Node ID/Pattern
Replacement
Type
-1
ModbusTcpChannel.RTU001.Current
Tags.RTU001.Current
Simple
Namespace Index
Node ID/Pattern
Replacement
Type
-1
^ModbusRtuChannel
Tags
Regex
Namespace Index
Node ID/Pattern
Replacement
Type
-1
^ModbusRtuChannel\..*\.RTU
Tags.Area1.RTU
Regex