Save OPC Toolbox objects to MAT-file
save FileName
save FileName Obj1 Obj2 ...
save('FileName','Obj1','Obj2',___)
save FileName saves all variables in the
MATLAB® workspace to the specified MAT-file, FileName. If
an extension is not specified for FileName, then a
.mat extension is used.
save FileName Obj1 Obj2 ... saves
OPC Toolbox™ objects, Obj1, Obj2,
... to the specified MAT-file, FileName.
If an extension is not specified for FileName, then a
.mat extension is used.
save('FileName','Obj1','Obj2',___) provides the
functional form of syntax. When using the functional form, you must specify the file
name and toolbox objects as character vectors or strings.
Any data associated with the toolbox object will not be stored in the MAT-file.
The data can be brought into the MATLAB workspace with getdata and then saved to the
MAT-file using a separate variable name.
The load command is used to return variables from the MAT-file
to the MATLAB workspace. Values for read-only properties will be restored to their
default values upon loading. For example, the Status property for an opcda object will be
restored to 'disconnected'. You use propinfo
to determine if a property is read-only.
Create a connected client and configure a group with two items. Then save the group.
da = opcda('localhost','Matrikon.OPC.Simulation'); connect(da); grp = addgroup(da,'ClearEventLogEx'); itm1 = additem(grp,'Random.Real8'); save mygroup grp