Instrument Control Toolbox | ![]() ![]() |
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 The Control Pins to learn more 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. For serial port objects, 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
Usage |
Serial port, VISA-serial |
Read only |
Always |
Data type |
Structure |
Values
off |
The associated pin is asserted |
on |
The associated pin is asserted |
The default value is instrument dependent.
Properties
DataTerminalReady
, PinStatusFcn
, RequestToSend
![]() | Parity | PinStatusFcn | ![]() |