Main Content

RS-232

Serial communication with RS-232 protocols

RS-232 is a mature point-to-point protocol for serial communication. Use the RS-232 blocks to communicate with other devices by using the serial ports built into the target computer. For detailed information about the target computer serial ports, see the manufacturer documentation.

See RS-232 Serial Communication.

Blocks

expand all

ASCII EncodeConvert Simulink values into uint8 character vector (Since R2020b)
ASCII DecodeParse ASCII character vector into Simulink values (Since R2020b)
ASCII Decode V2Parse ASCII character vector into Simulink values (Since R2020b)
FIFO ReadRead simple data streams (Since R2020b)
FIFO WriteWrite simple data streams (Since R2020b)
FIFO Read HDRSRead multiple ASCII data streams according to header information (Since R2020b)
FIFO Read BinaryRead multiple binary data streams according to header information (Since R2020b)
Modem ControlControl state of RTS and DTR output lines on serial port (Since R2020b)
Modem StatusReturn state of modem control lines (Since R2020b)
Legacy Serial ReadRead input data for baseboard serial communications (Since R2020b)
Legacy Serial SetupSet up baseboard serial communications (Since R2020b)
Legacy Serial WriteWrite output data for baseboard serial communications (Since R2020b)
Legacy Serial PortSend and receive data over mainboard baseboard serial port
Legacy Serial Port FSend and receive data over mainboard baseboard serial port with FIFO
Byte PackingConstruct data frames
Byte UnpackingDeconstruct data frames
Byte Reversal/Change EndianessReverse little-endian data for big-endian processor
Protocol DecoderDecode a uint8 byte stream by specifying the packet structure (Since R2023b)
Protocol EncoderEncode input data into a uint8 byte stream by specifying the packet structure (Since R2023b)
Shared Memory PackShared memory pack
Shared Memory UnpackShared memory unpacking

Topics

  • RS-232 Serial Communication

    Learn about the Simulink® Real-Time™ library for serial communication between target computers and serial devices.

  • RS-232 Legacy Drivers

    To represent multiple serial devices, use composite Simulink Real-Time RS-232 mainboard driver blocks.

Featured Examples