Documentation

This is machine translation

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

isConnected

Package: opc.hda

True if HDA Client is connected to server

Syntax

isConnected(hdaObj)

Description

isConnected(hdaObj) returns true if the OPC HDA Client object hdaObj is connected to an OPC HDA server, and false otherwise.

If hdaObj is an array, isConnected returns an array the same size as hdaObj, containing true where that respective element of hdaObj is connected to a server and false otherwise.

Examples

Create an HDA client for the Matrikon™ Simulation Server and connect to the server:

hdaObj = opchda('localhost', 'Matrikon.OPC.Simulation');
connect(hdaObj);

Check the status of the connection:

tf = isConnected(hdaObj)

See Also

|

Introduced in R2011a

Was this topic helpful?