Products & Services Solutions Academia Support User Community Company

Learn more about OPC Toolbox   

delete - Remove OPC Toolbox objects from memory

Syntax

delete(Obj)

Description

delete(Obj) removes the OPC Toolbox object Obj from memory. Obj can be an array of objects. A deleted object becomes invalid and you should remove references to that object from the workspace with the clear command. Deleting an object that contains children (groups or items) also deletes these children, so you should remove references to these children.

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, delete disconnects and deletes the object.

Examples

Delete a group and its children from memory:

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

See Also

disconnect | isvalid

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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