Main Content

setDTR

Set serial DTR pin

Description

example

setDTR(device,true) sets the specified serial data terminal ready (DTR) pin.

example

setDTR(device,false) resets the specified serial DTR pin.

Examples

collapse all

Set and then reset the serial DTR pin.

device = serialport("COM3",9600);
 ⋮
setDTR(device,true)
 ⋮
setDTR(device,false)

Set and then reset the serial DTR pin using the VISA-Serial interface.

device = visadev("COM3");
 ⋮
setDTR(device,true)
 ⋮
setDTR(device,false)

Input Arguments

collapse all

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

Example: setDTR(device,true) sets the DTR pin for the serial port connection device.

Example: setDTR(device,true) sets the DTR pin for the VISA-Serial resource device.

See Also

Functions

Introduced in R2019b