serialportfind
Description
S
= serialportfind
finds existing persistent
serial port connections and returns an array of serialport
objects corresponding to each connection.
finds connections with property values matching those specified by one or more name-value
arguments. For instance, S
= serialportfind(Name=Value
)S = serialportfind(Tag="Scope")
returns existing
serial connections whose Tag
property is set to
"Scope"
.
Examples
Input Arguments
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: serialportfind(Tag="Scope",BaudRate=14400)
returns existing
serial connections whose Tag
property is set to
"Scope"
and have baud rate of 14400.
For serialportfind
, you can use one or more properties of the
serialport
object as name-value arguments to specify
characteristics of the connections you want to find.
Output Arguments
Tips
serialportfind
finds existingserialport
connections. To get a list of all available serial ports whether or not connections exist, useserialportlist
.
Version History
Introduced in R2024a