connect (opcua)

Connect OPC UA client to server

Syntax

connect(UaClient)

Description

example

connect(UaClient) connects the OPC UA client UaClient to its referenced server using anonymous user authentication.

Note

OPC Toolbox™ currently supports only unsecured connections.

When the client successfully connects to the server, the client object Status property is set to 'Connected', the first level of the server namespace is retrieved, and various essential properties of the client are read from the server.

If UaClient is a vector of clients, and some but not all clients can connect, a warning is issued. If no clients can connect, an error is generated.

Use the disconnnect function to disconnect the client from the server.

Examples

collapse all

Locate an OPC UA server and connect a client to it.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);

Input Arguments

collapse all

OPC UA client, specified as an OPC UA client object or array of objects.

Example: opcua()

See Also

Functions

Introduced in R2015b