User`s manual

8 Serial Port I/O
8-32
The properties associated with writing data are given below.
The Output Buffer and Data Flow
The output buffer is computer memory allocated by the serial port object to
store data that is to be written to the device. When writing data to your device,
the data flow follows these two steps:
1 The data specified by the write function is sent to the output buffer.
2 The data in the output buffer is sent to the device.
The
OutputBufferSize property specifies the maximum number of bytes that
you can store in the output buffer. The
BytesToOutput property indicates the
number of bytes currently in the output buffer. The default values for these
properties are given below.
s = serial('COM1');
get(s,{'OutputBufferSize','BytesToOutput'})
ans =
[512] [0]
If you attempt to write more data than can fit in the output buffer, an error is
returned and no data is written.
Table 8-6: Properties Associated with Writing Data
Property Name Description
BytesToOutput
Indicate the number of bytes currently in the output
buffer
OutputBufferSize Specify the size of the output buffer in bytes
Timeout Specify the waiting time to complete a read or write
operation
TransferStatus Indicate if an asynchronous read or write operation is
in progress
ValuesSent Indicate the total number of values written to the
device