serialport
Connection to serial port
Description
A serialport
object represents a serial client for
communication with the serial port. After creating the object, use dot notation to set its
properties.
Creation
Description
connects to the serial port specified by s
= serialport(port
,baudrate
)port
with a baud rate of
baudrate
.
connects to the serial port and sets additional properties using optional name-value pair
arguments.s
= serialport(port
,baudrate
,Name,Value
)
, without arguments, connects
to the serial port using the property settings of your last cleared
s
= serialportserialport
object instance. The retained properties are
Port
, BaudRate
,
ByteOrder
, FlowControl
,
StopBits
, DataBits
,
Parity
, Timeout
, and
Terminator
. See Properties.
Input Arguments
Properties
Object Functions
read | Read data from serial port |
readline | Read line of ASCII string data from serial port |
readbinblock | Read one binblock of data from serial port |
write | Write data to serial port |
writeline | Write line of ASCII data to serial port |
writebinblock | Write one binblock of data to serial port |
writeread | Write command to serial port and read response |
serialbreak | Send break to device connected to serial port |
flush | Clear serial port device buffers |
configureTerminator | Set terminator for ASCII string communication with serial port |
configureCallback | Set callback function and trigger condition for communication with serial port device |
getpinstatus | Get serial pin status |
setRTS | Set serial RTS pin |
setDTR | Set serial DTR pin |
delete | Remove instrument objects from memory |
clear | Remove instrument objects from MATLAB workspace |