External Interfaces/API |
Indicate the state of the CD, CTS, DSR, and RI pins
Description
PinStatus
is a structure array that contains the fields CarrierDetect
, ClearToSend
, DataSetReady
and RingIndicator
. These fields indicate the state of the Carrier Detect (CD), Clear to Send (CTS), Data Set Ready (DSR) and Ring Indicator (RI) pins, respectively. Refer to Serial Port Signals and Pin Assignments for more information about these pins.
PinStatus
can be on
or off
for any of these fields. A value of on
indicates the associated pin is asserted. A value of off
indicates the associated pin is unasserted. A pin status event occurs when any of these pins changes its state. A pin status event executes the M-file specified by PinStatusFcn
.
In normal usage, the Data Terminal Ready (DTR) and DSR pins work together, while the Request to Send (RTS) and CTS pins work together. You can specify the state of the DTR pin with the DataTerminalReady
property. You can specify the state of the RTS pin with the RequestToSend
property.
Refer to Example: Connecting Two Modems for an example that uses PinStatus
.
Characteristics
Read only |
Always |
Data type |
Structure |
Values
off |
The associated pin is asserted. |
on |
The associated pin is asserted. |
The default value is device dependent.
Properties
DataTerminalReady
, PinStatusFcn
, RequestToSend
Parity | PinStatusFcn |