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.


True for undeleted OPC Toolbox objects


A = isvalid(Obj)


A = isvalid(Obj) returns a logical array, A, that contains false where the elements of Obj are deleted OPC Toolbox™ objects and true where the elements of Obj are valid objects.

Use the clear command to clear an invalid toolbox object from the workspace.


Create two valid OPC data access objects, and then delete one to make it invalid:

da(1) = opcda('localhost','Dummy.ServerA'); 
da(2) = opcda('localhost','Dummy.ServerB'); 
out1 = isvalid(da)
% Delete the first object and show it is invalid:
out2 = isvalid(da)
% Delete the second object and clear the object array:
clear da

See Also


Introduced before R2006a