User`s manual

8 Serial Port I/O
8-60
Note Some devices also use the DTR and DSR pins for handshaking.
However, these pins are typically used to indicate that the system is ready for
communication, and are not used to control data transmission. In MATLAB,
hardware handshaking always uses the RTS and CTS pins.
If your device does not use hardware handshaking in the standard way, then
you may need to manually configure the
RequestToSend property. In this case,
you should configure
FlowControl to none. If FlowControl is hardware, then
the
RequestToSend value that you specify may not be honored. Refer to the
device documentation to determine its specific pin behavior.
Software Handshaking
Software handshaking uses specific ASCII characters to control data flow.
These characters, known as Xon and Xoff (or XON and XOFF), are described
below.
When using software handshaking, the control characters are sent over the
transmission line the same way as regular data. Therefore you need only the
TD, RD, and GND pins.
The main disadvantage of software handshaking is that you cannot write the
Xon or Xoff characters while numerical data is being written to the device. This
is because numerical data may contain a 17 or 19, which makes it impossible
to distinguish between the control characters and the data. However, you can
write Xon or Xoff while data is being asynchronously read from the device since
you are using both the TD and RD pins, respectively.
Table 8-12: Software Handshaking Characters
Character Decimal
Value
Description
Xon 17 Resume data transmission
Xoff 19 Pause data transmission