| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → OPC Toolbox |
| Contents | Index |
| Learn more about OPC Toolbox |
opcreset
opcreset -force
opcreset disconnects and deletes all OPC Toolbox objects. This command flushes any data stored in the buffer, cancels all asynchronous operations, and closes any open log files.
You cannot reconnect a toolbox object to the server after you delete the object. Therefore, you should remove these objects from the workspace with the clear function.
Note that you cannot call opcreset if an opctool session is open, or if Simulink models containing OPC Toolbox blocks are open. Close all opctool sessions and all open Simulink models containing OPC Toolbox blocks before calling opcreset.
opcreset -force closes all open opctool sessions and all Simulink models containing OPC Toolbox blocks, without prompting to save those sessions and models. If you use the -force option, you lose any unsaved changes to those sessions and models. Use the -force option only as a last resort.
Create an opcda object, and add a group to that object. Then delete the OPC Toolbox objects using opcreset, and clear all variables from the workspace.
da = opcda('localhost','Dummy.Server');
grp = addgroup(da);
opcreset; % Deletes all objects
% Clear the variables
clear da grp
opcfind
clear | delete | opcfind | opctool
![]() | opcregister | opcserverinfo | ![]() |

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 |