This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

connect (opcua)

Connect OPC UA client to server





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


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.


collapse all

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

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

Input Arguments

collapse all

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

Example: opcua()

See Also


Introduced in R2015b