Monokot Server 1.x
  • What is Monokot Server?
  • Quickstart
  • 🐸Basics
    • Supported OS and Hardware
    • Installation
    • Licensing
    • OPC UA
      • UA TCP Endpoint
      • UA Settings
      • Client Certificates
      • Aliases
      • Access to Object Settings
      • Troubleshooting
    • Security Certififcate
    • Users & Roles
    • Administrator GUI
      • Event Log
      • Users in Monokot Server Administrator
      • Roles in Monokot Server Administrator
    • Startup Parameters
  • 🦊Tags & Devices
    • Devices
      • Diagnostics
      • Devices in the Monokot Server Administrator
    • Tags
      • Parameters
      • Change Trigger
      • Tags in Monokot Server Administrator
        • Go Online
        • Group Action
        • Import & Export
    • Modbus Connectivity
      • Parameters
      • Addressing
      • Diagnostics
    • Siemens Connectivity
      • Parameters
      • Addressing
      • Access to DBs area in S7-1200/S7-1500
    • IEC 60870-5-104 Connectivity
      • Parameters
      • Addressing
      • Time Conversion
      • Diagnostics and Commands
    • OPC UA Connectivity
      • Parameters
      • Addressing
      • Diagnostics
      • How to: Importing OPC UA items
      • How to: Pulling Security Certificate
    • InfluxDB Connectivity (Connector)
      • Parameters
      • Addressing
      • Query Result and Data Mapping
      • Diagnostics
      • How to: Configure for InfluxDB 2.x
    • SNMP Connectivity
      • Parameters
      • Addressing
      • UDP Considerations
  • 🐺Time Series & Stores
    • Stores
      • Backlog
      • Diagnostics
      • Stores in Monokot Server Administrator
    • Time Series
      • Parameters
      • Deadband
      • Sampling
      • Last Sample Repeat
      • Time Series in Monokot Server Administrator
        • Group Action
        • Import & Export
    • InfluxDB Connectivity (Store)
      • Parameters
      • Addressing
      • Data Structure
      • About Metadata
      • Diagnostics
      • How to: Configure for InfluxDB 2.x
    • PostgreSQL Connectivity
      • Parameters
      • Addressing
      • Database Design
      • Data Compression
    • REST Connectivity
      • Parameters
      • Addressing
      • Message Script
      • RestRequestMessage
      • DataContext
      • TimeSeries
  • 🐻Scripts
    • Overview
    • Expression
      • Parameters
      • Import & Export
      • Go Online
    • Programming Examples
      • How to: Calculate Arithmetic Mean
      • How to: DoNothing
      • How to: Writing to Tag
      • How to: Inverting Bits
      • How to: Execute SQL
      • How to: Run Ping
      • How to: Do Simulation
      • How to: String Formatting
      • How to: OPC UA Method
      • How to: Initialize Device Settings from File
    • API
      • Bundle
      • BundlePair
      • Context
      • DataMap
      • DataMapPair
      • DataTriggerInfo
      • Expression
      • MosCrypto
      • MosDirectories
      • MosFiles
      • MosOdbc
      • MosOdbcReader
      • MosProcess
      • MosProcessExecuteResult
      • MosText
      • MosUtils
      • ValueState
Powered by GitBook
On this page
  1. Basics
  2. OPC UA

Aliases

PreviousClient CertificatesNextAccess to Object Settings

Last updated 2 years ago

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:

Namespace Index

Node ID/Pattern

Replacement

Type

-1

ModbusTcpChannel.RTU001.Current

Tags.RTU001.Current

Simple

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:

Namespace Index

Node ID/Pattern

Replacement

Type

-1

^ModbusRtuChannel

Tags

Regex

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:

ns=3;s=ModbusRtuChannel.RTU004.Current → ns=2;s=Tags.RTU004.Current
ns=1;s=ModbusRtuChannel.SWT-10.Link → ns=2;s=Tags.SWT-10.Link
ns=2;s=ModbusRtuChannel.Pump.Plc.CpuAvg → ns=2;s=Tags.Pump.Plc.CpuAvg

Consider an example of another regular expression-based alias:

Namespace Index

Node ID/Pattern

Replacement

Type

-1

^ModbusRtuChannel\..*\.RTU

Tags.Area1.RTU

Regex

This alias will transform the IDs of the source OPC UA items as follows:

ns=3;s=ModbusRtuChannel.Group1.SubGroup1.RTU004.Current → ns=2;s=Tags.Area1.RTU004.Current
ns=3;s=ModbusRtuChannel.MyGroup.RTU100.Power → ns=2;s=Tags.Area1.RTU100.Power

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.

A detailed description of the language for substitutions in regular expressions is provided . To test the template, you can use the online service located . 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).

🐸
here
here