Main Content

getpinstatus

Get serial pin status

Description

example

status = getpinstatus(device) gets the serial pin status and returns it as a structure to status.

Examples

collapse all

Get the serial pin status for the specified port.

device = serialport("COM3",9600);
 ⋮
status = getpinstatus(device)
status = 

  struct with fields:

      ClearToSend: 1
     DataSetReady: 1
    CarrierDetect: 1
    RingIndicator: 0

Get the serial pin status for the specified port using the VISA-Serial interface.

device = visadev("COM3");
 ⋮
status = getpinstatus(device)
status = 

  struct with fields:

      ClearToSend: 1
     DataSetReady: 1
    CarrierDetect: 1
    RingIndicator: 0

Input Arguments

collapse all

Serial port, specified as a serialport object or visadev object.

Example: getpinstatus(device) returns the serial pin status for the serial port connection device.

Example: getpinstatus(device) returns the serial pin status for the VISA-Serial resource device.

Output Arguments

collapse all

Pin status, returned as a structure with the logical type fields named ClearToSend, DataSetReady, CarrierDetect, and RingIndicator.

See Also

Functions

Introduced in R2019b