This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


OPC Toolbox object properties


Val = get(Obj,'PropName')
Val = get(Obj)


Val = get(Obj,'PropName') returns the value Val of the property specified by the character vector or string PropName, for the OPC Toolbox™ object Obj.

If PropName is an array of property names, get returns a 1-by-N cell array of values, where N is the length of PropName. If Obj is a vector of toolbox objects, Val is an M-by-N cell array of property values where M is equal to the length of Obj and N is equal to the number of properties requested.

get(Obj) displays all property names and their current values for the toolbox object Obj.

Val = get(Obj) returns a structure, Val, where each field name is the name of a property of Obj containing the value of that property. If Obj is an array of toolbox objects, Val is an M-by-1 structure array.


Obtain the values of the Status and Group properties of an opcda object, and then display all the properties of the object:

da = opcda('localhost','Dummy.Server'); 
get(da, {'Status','Group'}) 
out = get(da,'Status') 


As an alternative to the get function, you can directly retrieve property values using dot-notation. The following two lines achieve the same result.

t = get(daObj,'Timeout');
t = daObj.Timeout;

See Also


Introduced before R2006a