Configuration
  • 22 Oct 2024
  • 5 Minutes to read
  • PDF

Configuration

  • PDF

Article summary

Note:
Before starting configuration, a new module instance must first be created. Click here for more information about creating Module instances.

Each module has an API and Logger section that need to be configured separately. The default settings will be sufficient for this, but users will need to actively open the API and Logger configuration settings and save the default values to fully apply the settings. Click here for more information about API and Logger Configuration.
Note:
Please note that starting from N3uron version 1.21.5, the API section has been completely removed from the configuration options.

Module Configuration

Once a new OPC UA Server module instance is created, users can configure different parameters to establish how connections to the server should be made. Below you will find a brief explanation of what each of these parameters mean and how to configure them:

  • Network Interface: Specifies which network interface cards will be permitted for incoming connections. For example:
    • 127.0.0.1 or localhost only allows connections from local applications.
    • It's also possible to select the network interface by either entering its specific IP address or clicking on the button to the right of the Network interface field.Figure - OPC UA Server Network Interface 2


      Figure - OPC UA Server Select Network Adapter 2


  • TCP Port: Specifies the port number for incoming connections. The valid range is 1 to 65535. The default value is 3005.
Note:
Make sure that the port number is not used by any other application.

  • Alternate Host: Specifies one or more alternate hosts to use during the initial handshake as a comma-separated list of hosts. Usually, the public IP address is used if the server is behind a firewall to avoid authentication problems for the client.
  • Allow anonymous user: When set to True, users can login anonymously with all permissions.
  • Disable discovery: Enables or disables discovery for this endpoint. The default value is Disabled.
  • Security policies: Specifies which security mechanism should be used. Supported algorithms are as follows:
    • None
    • Basic 128 & Rsa 15 (deprecated since OPC UA Specification Version 1.04)
    • Basic 256 (deprecated since OPC UA Specification Version 1.04)  
    • Basic 256 & Sha 256
  • Server:
    • Separator: Specifies which character will act as a separator for tag names. The default is ".".
    • Published number type: Selects the OPCUA type that will be used when publishing number tags.
      • Double: Publishes numbers as an IEEE double precision (64 bit) floating point value (OPCUA type 11).
      • Float: Publishes numbers as an IEEE single precision (32 bit) floating point value (OPCUA type 10). 
        Note:
        This field is available from N3uron version 1.21.4.
    • Maximum number of connections: Maximum number of connections per endpoint. The default value is 20.
    • Include tag properties: Determines whether to include tag properties (such as full path, source nameengineering units, etc.) as part of the address space. The default value is Disabled.
      Note:
      When enabled, the RAM usage of the module will increase substantially.
  • Server capabilities:
    • Maximum number of sessions: Maximum number of active sessions in the server. The default value is 20.
    • Minimum supported sample rate: Minimum sampling rate for tag events that the server will support, displayed in milliseconds. The default value is 500 ms.
  • Store & Forward
    • Enabled: When Enabled, all data flowing from remote nodes via Links will be halted and data will be stored in the remote nodes whenever there are no active OPC Clients consuming this data. As soon as at least one OPC Client starts consuming data from a remote node, the data flow from this node will be resumed.
Note:
If Store & Forward is enabled and there are no OPC Clients currently consuming data, Store & Forward mode will be activated and data values coming from remote nodes will not be updated.
  • Buffer Size: Defines the maximum number of events to store before sending a halt command to the source link. The default value is 100.

Figure - OPC UA Server Config

Access

In this area, you will assign the corresponding permissions to the Roles previously created in the Roles section. 

Figure 3 - Access 2

Parameters:

  • Enabled: Specifies whether or not an authentication attempt will be blocked. 
  • Node Permissions:
    • Browse: Enables browsing of the _Node object.
    • Read role permissions: Allows reading of role permissions in the _Node object.
    • Write attribute: Allows attributes to be written in the _Node object.
    • Read: Allows reading of values in the _Node object.
    • Write: Allows values to be written in the _Node object .
    • Read history: Allows reading of historic values in the _Node object.
    • Receive events: Allows node events to be received from the _Node object.
    • Call method: Allows calling of node methods in the _Node object.
  • Tag permissions:
    • Browse: Allows tag browsing. 
    • Read role permissions: Allows reading of tag role permissions.
    • Write attribute: Allows attributes to be written to tags. 
    • Read: Allows reading of tag values. 
    • Write: Allows writing of tag values. 
    • Read history: Allows reading of tag history. 
    • Receive events: Allows OPCUA events to be received from tag objects. 
    • Call method: Allows calling of tag methods. 
  • Tag access: 
    • Tag Filter: Define and configure the filter for tags to be included in the message.
      Note:
      It is mandatory to add a filter even when the whole model is going to be exposed.
      • Mode: Selects whether the filter must include or exclude tags. 
        Note:
        Include filters are applied first and exclude filters are applied to the result of the include filters.
      • Path: Specifies the path of the tag or group of tags to be filtered. 
      • Regex Pattern: This is a regular expression for filtering which tags will be included. By default, it is set to .*, which means that no filter is applied. Readers can find further information about regular expressions at RegExr.

Certificates

Once the module is running, whenever a client connects with a secure connection (different from None/None), the server will receive the client's certificate. By default, any certificate received is Rejected in N3uron and therefore, must be manually trusted in order to be able to establish the connection. For those clients that by default reject certificates sent by the server, manual approval of the certificate on the client side will also be necessary.

Figure 7.2 - Trust


Methods

The OPC UA Server module allows users to define methods along with their input and output arguments. These methods enable users to execute custom logic in the N3uron node by calling a script previously created in Scripting. Each method can have zero or more input and output parameters, which support a variety of data types and value ranks. When a method is defined, it will be available in the _Node/Methods/METHOD_NAME node of the OPC UA Address Space.

Note:
In order to use Methods, it is necessary to run both a Scripting module and at least one external script that will be invoked by the method.
Note:
The return value of the script has to be an object whose keys are the names of the output arguments and its values are the output values. The value type must be coherent with the OPC UA types declared in the method definition.


To create a new method, expand the OPC UA Server module instance menu and select Methods.

Figure - Method 1


The method configuration settings contain the following options:

  • Enabled: Enables and disables the corresponding method.
  • Scripting instance: Selects the corresponding Scripting module instance, which contains the script that will be executed when the method is called.
  • Script name: Name of the script that will be executed when the method is called. It is possible to either enter the path manually or click on the button to the right of the Script name field and use the browser to select it, providing that the Scripting module instance is running.
  • Description: Method description.

Figure - Method 2


Figure - Method 3


Once the corresponding script has been selected, the Input and Output arguments can be created if necessary. To do this, click either on the buttons to the right of Input arguments or Output arguments to add them, enter a description if you like, and select the corresponding settings for both the Data type and the Value rank fields.

Figure - Input arguments

Figure - Output arguments




Was this article helpful?

What's Next