isvalid - True for OPC Toolbox™ objects that are not deleted

Syntax

A = isvalid(Obj)

Description

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.

An invalid toolbox object should be cleared from the workspace with clear.

Examples

Create two valid OPC data access objects.

da(1) = opcda('localhost','Dummy.ServerA'); 
da(2) = opcda('localhost','Dummy.ServerB'); 
out1 = isvalid(da) 

Delete the first object and make it invalid.

delete(da(1)) 
out2 = isvalid(da)

Clear the object.

clear da

See Also

delete, opchelp

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS