Download Data Acquisition Toolbox User`s Guide

Transcript
Saving and Loading Device Objects
Saving Device Objects to a MAT-File
You can save a device object to a MAT-file just as you would any workspace
variable – using the save command. For example, to save the analog input
object ai and the variable time defined in the preceding section to the MAT-file
myai1.mat
save myai1 ai time
Read-only property values are not saved. Therefore, read-only properties use
their default values when you load the device object into the MATLAB
workspace. To determine if a property is read-only, use the propinfo function
or examine the property reference pages.
Loading the Device Object
To load a device object that was saved to a MAT-file into the MATLAB
workspace, use the load command. For example, to load ai and time from
MAT-file myai1.mat
load myai1
8-5