Saving and Loading
You can save serial port objects to a MAT-file just as you would any workspace variable - using the
save command. For example, suppose you create the serial port object
s associated with the serial port COM1, configure several property values, and perform a write and read operation.
To save the serial port object and the data read from the device to the MAT-file
You can save data and event information as text to a disk file with the |
You can recreate
out in the workspace using the
Values for read-only properties are restored to their default values upon loading. For example, the
Status property is restored to
closed. Therefore, to use
s, you must connect it to the device with the
fopen function. To determine if a property is read-only, examine its reference pages.
|Example: Recording Information to Disk||Using Serial Port Objects on Different Platforms|
© 1994-2005 The MathWorks, Inc.