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.


Load OPC Toolbox objects from MAT-file


load FileName
load FileName Obj1 Obj2 ...
S = load('FileName','Obj1','Obj2',...)


load FileName returns all variables from the MAT-file FileName into the MATLAB® workspace.

load FileName Obj1 Obj2 ... returns the specified OPC Toolbox™ objects, Obj1, Obj2, ... from the MAT-file FileName into the MATLAB workspace.

S = load('FileName','Obj1','Obj2',...) returns the structure S with the specified toolbox objects Obj1, Obj2, ... from the MAT-file FileName, instead of directly loading the toolbox objects into the workspace. The field names in S match the names of the retrieved toolbox objects. If you specify no objects, load returns all variables from the MAT-file.

When you load an object, its read-only properties initially take their default values. For example, the Status property value of an opcda object is 'disconnected'. Use propinfo to determine if a property is read-only.


Assume the example on the save reference page saved the group object grp in the file mygroup. Load the group object from mygroup, and create a reference to the parent client.

load mygroup
da = grp.Parent;

See Also


Introduced before R2006a