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.

isConnected (opcua)

Determine if OPC UA client object is connected to server

Syntax

tf = isConnected(UaClient)

Description

tf = isConnected(UaClient) returns true (logical 1) if the client UaClient is connected to the server, or false (logical 0) otherwise. If UaClient is a vector of client objects, tf is a vector representing the connected state of each client.

Examples

Connect an OPC UA client and view its connection status.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);
isConnected(UaClient)
1
disconnect(UaClient);
isConnected(UaClient)
0

Introduced in R2015b

Was this topic helpful?