Quantcast

Documentation Center

  • Trial Software
  • Product Updates

opcda

Construct OPC data access object

Syntax

Obj = opcda('Host','ServerID')
Obj = opcda('Host','ServerID','P1',V1,'P2',V2,...)

Description

Obj = opcda('Host','ServerID') constructs an OPC data access (opcda) object, Obj, for the host specified by Host and the OPC server ID specified by ServerID. When you construct Obj, its initial Status property value is 'disconnected'. To communicate with the server, you must connect Obj to the server with the connect function.

Obj = opcda('Host','ServerID','P1',V1,'P2',V2,...) constructs an OPC data access object, Obj, for the host specified by Host and the OPC server ID specified by ServerID, applying the specified property values. If you specify an invalid property name or value, the function does not create an object.

Note that the property name/property value pairs can be any format that the set function supports, i.e., parameter-value string pairs, structures, and parameter-value cell array pairs.

At any time, you can view a complete listing of OPC Toolbox™ functions and properties with the opchelp function.

Examples

Create an opcda client for a local server:

daObj1 = opcda('localhost', 'Dummy.Server.ID');

Create an opcda client for a remote server:

daObj2 = opcda('ServerHost1', 'OPCServer.ID');

See Also

| |

Was this topic helpful?