Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

Serial Port Devices

Devices connected to your computer's serial port

Functions

delete (serial) Remove serial port object from memory
fclose (serial) Disconnect serial port object from device
fgetl (serial) Read line of text from device and discard terminator
fgets (serial) Read line of text from device and include terminator
fopen (serial) Connect serial port object to device
fprintf (serial) Write text to device
fread (serial) Read binary data from device
fscanf (serial) Read data from device, and format as text
fwrite (serial) Write binary data to device
get (serial) Serial port object properties
instrcallback Event information when event occurs
instrfind Read serial port objects from memory to MATLAB workspace
instrfindall Find visible and hidden serial port objects
isvalid (serial) Determine whether serial port objects are valid
readasync Read data asynchronously from device
record Record data and event information to file
serial Create serial port object
serialbreak Send break to device connected to serial port
set (serial) Configure or display serial port object properties
stopasync Stop asynchronous read and write operations
clear (serial) Remove serial port object from MATLAB workspace
load (serial) Load serial port objects and variables into MATLAB workspace
save (serial) Save serial port objects and variables to file
disp (serial) Serial port object summary information
length (serial) Length of serial port object array
size (serial) Size of serial port object array

Properties

BaudRate Specify the rate at which bits are transmitted
BreakInterruptFcn Specify the callback function to execute when a break-interrupt event occurs
ByteOrder Specify the byte order of the device
BytesAvailable Number of bytes available in the input buffer
BytesAvailableFcn Specify the callback function to execute when a specified number of bytes is available in the input buffer, or a terminator is read
BytesAvailableFcnCount Specify the number of bytes that must be available in the input buffer to generate a bytes-available event
BytesAvailableFcnMode Specify if the bytes-available event is generated after a specified number of bytes is available in the input buffer, or after a terminator is read
BytesToOutput Number of bytes currently in the output buffer
DataBits Number of data bits to transmit
DataTerminalReady State of the DTR pin
ErrorFcn Specify the callback function to execute when an error event occurs
FlowControl Data flow control method to use
InputBufferSize Size of the input buffer in bytes
Name Descriptive name for the serial port object
ObjectVisibility Control access to serial port object
OutputBufferSize Size of the output buffer in bytes
OutputEmptyFcn Specify the callback function to execute when the output buffer is empty
Parity Specify the type of parity checking
PinStatus State of the CD, CTS, DSR, and RI pins
PinStatusFcn Specify the callback function to execute when the CD, CTS, DSR, or RI pins change state
Port Specify the platform-specific serial port name
ReadAsyncMode Specify whether an asynchronous read operation is continuous or manual
RecordDetail Specify the amount of information saved to a record file
RecordMode Specify whether data and event information are saved to one record file or to multiple record files
RecordName Name of the record file
RecordStatus Indicate if data and event information are saved to a record file
RequestToSend State of the RTS pin
Status Indicate if the serial port object is connected to the device
StopBits Number of bits used to indicate the end of a byte
Tag Label to associate with a serial port object
Terminator Terminator character
Timeout Waiting time to complete a read or write operation
TimerFcn Specify the callback function to execute when a predefined period of time passes.
TimerPeriod Period of time between timer events
TransferStatus Indicate if an asynchronous read or write operation is in progress
Type Object type
UserData Data you want to associate with a serial port object
ValuesReceived Total number of values read from the device
ValuesSent Total number of values written to the device
Was this topic helpful?