| OPC Toolbox™ | ![]() |
delete(Obj)
delete(Obj) removes the OPC Toolbox object Obj from memory. Obj can be an array of objects. A deleted object becomes invalid and references to that object should be removed from the workspace with the clear command. If you delete an object that contains children (groups or items), then the children are also deleted and references to these children should be removed.
If multiple references to a toolbox object exist in the workspace, then deleting one object invalidates the remaining references.
If Obj is an opcda object connected to the server when delete is called, the object will be disconnected and then deleted.
da = opcda('localhost','Matrikon.OPC.Simulation');
connect(da);
grp = addgroup(da,'DeleteEx');
itm = additem(grp,'Random.Real4');
r = read(grp)
delete(grp); % deletes itm as well
clear grp itm![]() | copyobj | disconnect | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |