WOLFRAM SYSTEM MODELER

AuthenticationAndEncryption

Demonstrates how to enable authentication and encryption

Diagram

Wolfram Language

In[1]:=
SystemModel["OPCUA.Examples.AuthenticationAndEncryption"]
Out[1]:=

Information

This example shows how to connect to an OPC UA server that requires authentication and secure communication. To run the example, the ExampleServer needs to be started with the following arguments:

ExampleServer -cert -ac

Authentication and security can be configured by redeclaring the replaceable models AuthenticationConfiguration and SecurityConfiguration in Client. This is accessible by selecting the client and navigating to the Parameters section of the General view.

Secured communication is enabled by setting SecurityConfiguration to Secured communication configuration. Click the edit button next to the value to edit the security configuration; for more information on configuring communication security, see Secured.

To enable authentication, set AuthenticationConfiguration to the desired authentication method. This example uses Username; for a list of supported authentication methods, see the Authentication package. Click the edit button next to the value to specify method-specific parameters, in this case, username and password.

If secure communication and authentication are successfully established, simulating the example will generate a plot of the node "the.answer", which is initialized to 42 by the ExampleServer.

Components (3)

client

Type: Client

Description: Client for connecting to an OPC UA server

readInteger

Type: Read

Description: Adds reading of an Integer scalar node to a ReadNodeList

readClock

Type: PeriodicExactClock

Description: Generate a periodic clock signal with a period defined by an Integer number with resolution