OPC UA client

BrowseName: OPCUAClient
SuperType: Object (BaseObjectType)
TypeView path: Tipi > OPC-UA > Client OPC UA

In design time and/or at runtime, imports the nodes of interest published by an OPC UA server and can keep the structures and values synchronized.

Applications

Used to import objects and variables in design time or at runtime from an OPC UA server to create the desired application logics at runtime.

If imported at design time, the nodes remain synchronized with the server nodes in reading and writing even at runtime, (if the client has adequate permissions). At any time in design time, using the Q Studio dedicated editor, the nodes of interest to be imported can be selected. During import, for each node desired by the server, a corresponding project node is created.

Important

for nodes imported at design time, including object/variable types, corresponding BaseObject or BaseVariable nodes are created.

To import the nodes at runtime for more advanced uses, it is possible to choose different synchronization modes. In this case, the nodes are imported when the OPC UA Client object is initialized, i.e. at the project start-up at runtime.

Configuring the object

Configure the import of nodes at runtime

  1. Click the OPC UA client.

  2. In the Property panel, in Runtime configurations click image07565D13: a configuration of nodes to import is added.

  1. In the configuration just created, set the Locale destination node property and Remote source node, then set the import/synchronization mode. .. Note:: for now, the import of graphical objects and LocalizationDictionary objects only functions in Import only mode.

Note

the selected source node automatically selects all its child nodes. To import only the child nodes, set Include remote source nodes to False.

  1. To listen to the events generated by the selected nodes, do the following:

    1. Set Enable event synchronization to True.

    2. In Event type click image453204BF and in the dynamic links window, inside the Types > EventTypes node, select the event type to listen to.

  1. Repeat steps 2 to 4 for each configuration of nodes to be imported.

Safety configurations

Based on the values of the two Minimum message security mode and Minimum security policy* properties, the valid security configurations are the following, in order of increasing security:

Minimum security policy

Minimum message security mode

None

None

Basic256Sha256

Signature

Basic256Sha256

Signature and cryptography

Aes128_Sha256_RsaOaep

Signature

Aes128_Sha256_RsaOaep

Signature and cryptography

Aes256_Sha256_RsaPss

Signature

Aes256_Sha256_RsaPss

Signature and cryptography

When the client connects to the server, they choose the endpoint with the most secure configuration and that meets the minimum requirements indicated in the minimum message security mode and minimum security policy.

Verify Server Identity

For security issues, it is recommended to always set the Verity Server identity property to True and to manually add the certificate to those trusted. In fact, the public key contained in the certificate is used to encrypt the user password in the authentication mode requiring credentials (User identity type = User/Password), even if communication with the server is not secure (Minimum message security mode = None).

If any certificate is accepted temporarily, the password could be sent to a malicious server. if the Verify Server Identity property is set to True and the server certificate is not one of those trusted, the client continues to attempt the connection without success.

Properties

Name

BrowseName

DataType

Description

Server endpoint URL

ServerEndpointURL

String

Communications protocol and network address of the endpoint on the server.

Verify server identity

VerifyServerIdentity

Boolean

Validates the server’s public certificate. True = accept the certificate only if trusted False = temporarily accept the certificate even if it not trusted.

Requested publishing interval

RequestedPublishingInterval

Duration

Minimum message security mode

MinimumMessageSecurityMode

MessageSecurityModeEnum

Minimum security level for messages exchanged between client and server. None = the messages can be unsigned and unencrypted; Signature = the messages must be signed or signed and encrypted; Signature and encryption = the messages must be signed and encrypted.

Minimum security policy

MinimumSecurityPolicy

SecurityPolicyEnum

Minimum security level for messages exchanged between client and server. None = the client does not require any specific security policy; Basic256Sha256 = this policy or more secure; Aes128_Sha256_RsaOaep = this policy or more secure; Aes256_Sha256_RsaPss = this policy.

Client certificate file

ClientCertificateFile

ResourceUri

Client public certificate file, according to standard X509v3 and with .der extension. It must be found in the QApplication/ProjectFiles/PKI/Own/Client/ folder.

Client private key file

ClientPrivateKeyFile

ResourceUri

Client private key file, with ASCII Base64 encoding and .pem extension. It must be found in the QApplication/ProjectFiles/PKI/Own/Client/ folder.

User identity type

UserIdentityType

UserIdentityTypeEnum

This is the method for identification of the user. Anonymous = no information on the user available; User/Password = user identified by username and password; Certificate = user identified by a certificate.

Username

Username

String

Password

Password

Password

User certificate file

UserCertificateFile

ResourceUri

The user’s public certification file, type X509v3 and with .der extension. It must be found in the QApplication/ProjectFiles/PKI/Own/User/ folder.

User private key file

UserPrivateKeyFile

ResourceUri

User private key file, with ASCII Base64 encoding and .pem extension. It must be found in the QApplication/ProjectFiles/PKI/Own/User/ folder.

Application URI

ApplicationURI

String

URI that globally identifies the application instance

Application name

ApplicationName

String

A legible ID of the application instance, not necessarily unique

Product URI

ProductURI

String

URI that globally identifies the software

Connection status

ConnectionStatus

ConnectionStatusEnum

Server URI

ServerUri

String

Enabled

Enabled

Boolean

Enables the object.

Events

Events

EventsEnum

Synchronize the Node IDs on start

SynchronizeNodeIdsOnStart

Boolean

Synchronize the NodeIDs of the OPC UA nodes imported at design time with the NodeIDs of the same nodes on the server to which the client connects at runtime. If the situation on the server is not known, set it to True.

Objects

Object

Runtime configurations

RuntimeConfigurations

Collection of RuntimeConfigurationEntry

Methods

Subscribe to data change

BrowseName: SubscribeToDataChange

InputArguments

Name

DataType

Description

ReadValues

ReadValue

Read values

Unsubscribe from data change

BrowseName: UnsubscribeFromDataChange

InputArguments

Name

DataType

Description

ReadValues

ReadValue

Translate browse paths to Node IDs (NodeIds)

BrowseName: TranslateBrowsePathsToNodeIds

InputArguments

Name

DataType

Description

BrowsePaths

BaseDataType

Browse paths list

OutputArguments

Name

DataType

Description

NodeIds

NodeId

NodeIds list

Read values

BrowseName: ReadValues

InputArguments

Name

DataType

Description

ReadValues

ReadValue

Read values

OutputArguments

Name

DataType

Description

ReadValueResults

ReadValueResult

Read value results

Asynchronous read values

BrowseName: ReadValuesAsync

InputArguments

Name

DataType

Description

OperationId

Guid

Operation ID

ReadValues

ReadValue

Read values

Write values

BrowseName: WriteValues

InputArguments

Name

DataType

Description

WriteValues

WriteValue

Values to write

OutputArguments

Name

DataType

Description

WriteValueResults

WriteValueResult

Call method

BrowseName: CallMethod

InputArguments

Name

DataType

Description

TargetNode

NodeId

Method

NodeId

Method

InputArguments

BaseDataType

Input arguments

OutputArguments

Name

DataType

Description

ErrorCode

UInt32

Error code

OutputArguments

BaseDataType

Output arguments

Browse

BrowseName: Browse

InputArguments

Name

DataType

Description

NodeId

NodeId

Node ID of the node to browse

BrowseDirection

BrowseDirectionEnum

Reference browse direction

ReferenceTypeId

NodeId

Node ID of the reference type to browse

IncludeSubtypes

Boolean

Indicates whether subtypes of the reference type should be browsed

OutputArguments

Name

DataType

Description

Result

StatusCode

OPC UA-defined result code

References

ReferenceDescription

Reference descriptions

Import nodes

BrowseName: ImportNodes

InputArguments

Name

DataType

Description

NodesToImport

NodeId

Nodes to import

RecursiveImport

Boolean

Recursive import