User`s manual

Debugging: Recording Information to Disk
8-63
fprintf(s,'RS232?')
rs232 = fscanf(s);
End the serial port session.
fclose(s)
delete(s)
clear s
You can use the type command to display myfile.txt at the command line.
Creating Multiple Record Files
When you initiate recording with the record function, the RecordMode property
determines if a new record file is created or if new information is appended to
an existing record file.
You can configure
RecordMode to overwrite, append, or index. If RecordMode
is
overwrite, then the record file is overwritten each time recording is
initiated. If
RecordMode is append, then the new information is appended to the
file specified by
RecordName. If RecordMode is index, a different disk file is
created each time recording is initiated. The rules for specifying a record
filename are discussed in the next section.
Specifying a Filename
You specify the name of the record file with the RecordName property. You can
specify any value for
RecordName – including a directory path – provided the
filename is supported by your operating system. Additionally, if
RecordMode is
index, then the filename follows these rules:
Indexed filenames are identified by a number. This number precedes the
filename extension and is increased by 1 for successive record files.
If no number is specified as part of the initial filename, then the first record
file does not have a number associated with it. For example, if
RecordName is
myfile.txt, then myfile.txt is the name of the first record file,
myfile01.txt is the name of the second record file, and so on.
RecordName is updated after the record file is closed.
If the specified filename already exists, then the existing file is overwritten.