Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

connect (opcua)

Connect OPC UA client to server

Syntax

connect(UaClient)

Description

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 Status property is set to 'Connected', the first level of the server’s namespace is retrieved, and various essential properties of the client are read from the server.

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

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

Examples

Locate a server and connect a client to it.

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

Introduced in R2015b

Was this topic helpful?