opcfind
(To be removed) Find OPC objects with specific properties
Support for the OPC Data Access (DA) standard will be removed in a future release. Instead use OPC Unified Architecture (UA). See Version History.
Syntax
Out = opcfind
Out = opcfind('P1
',V1,'P2
',V2,...)
Out = opcfind(S)
Description
Out = opcfind
returns a cell array,
Out
, of all existing OPC objects.
Out = opcfind('
returns a cell array, P1
',V1,'P2
',V2,...) Out
, of toolbox objects whose property
values match those passed as property name/property value pairs,
P1
, V1
,
P2
, V2
, etc.
Out = opcfind(S)
returns a cell array,
Out
, of toolbox objects whose property values match those
defined in structure S
. The field names of S
are object property names and the field values of S
are the
requested property values.
Examples
Create some OPC objects:
da1 = opcda('localhost','Dummy.ServerA'); da2 = opcda('localhost','Dummy.ServerB'); da1.Tag = 'myopcTag'; da1.Timeout = 300; grp = addgroup(da2,'TestGroup'); itm = additem(grp,{'Dummy.Tag1','Dummy.Tag2'});
Find all OPC objects:
allObjCell = opcfind;
Find all objects with the Tag 'myopcTag'
:
myOPC = opcfind('Tag','myopcTag')
Find all daitem
objects:
itmCell = opcfind('Type','daitem')