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

|

Was this topic helpful?