Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

save

Save OPC Toolbox objects to MAT-file

Syntax

save FileName
save FileName Obj1 Obj2 ...
save('FileName','Obj1','Obj2',___)

Description

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.

Examples

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

See Also

Functions

Introduced before R2006a

Was this topic helpful?